function ideinitfonts(varargin)
%IDEINITFONTS Initialize MATLAB IDE fonts.
%   IDEINITFONTS(FILENAME) creates a file containing recommended
%   changes to the appropriate font.properties file.
%
%   NOTE:  This functionality is currently available only on
%   Microsoft Windows systems.
%
%   The MATLAB IDE uses Java to render fonts on-screen.  In order
%   to supply the full range of TrueType fonts available on your
%   operating system, MATLAB modifies your font.properties file at
%   startup.  In certain circumstances (such as certain network
%   installations) it is impossible for MATLAB to modify this file.
%   In these cases, you (or your system administrator) must modify
%   the font.properties file in your MATLAB distribution by hand.
%   If this is the case, you will be notified by an alert box the
%   first time you try to select a font from within the IDE.
%
%   You may generate a file that contains the recommended changes
%   to the font.properties file by running the command
%   ideinitfonts(filename).
%   
%   Example:
%      ideinitfonts(fullfile(tempdir, 'font.properties.add'));
%   creates the appropriate file in TEMPDIR.  The name of the file
%   that must be modified is included in that file.  You or your
%   system administrator should add the contents to the specified
%   file.  If no fonts have to be added (i.e., the file would be
%   empty), no file is created.  After modifying the
%   font.properties file by hand, it is necessary to exit and
%   restart MATLAB for the changes to take effect.

%   Copyright 1984-2000 The MathWorks, Inc. 
%   $Revision: 1.3 $

% Check for appropriate syntax
err = nargchk(1, 1, nargin);
if ~isempty(err)
    error(err);
end

% Replace / with \ on Windows
if ispc
    filename = strrep(varargin{1}, '/', '\\');
end

com.mathworks.mwt.MWFontHandler.addEntriesToFile(filename);

