[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: fontpath from fontconfig: was > [changeset] print.m (matlab compati
From: 
John W. Eaton 
Subject: 
Re: fontpath from fontconfig: was > [changeset] print.m (matlab compatibility) 
Date: 
Wed, 11 Mar 2009 13:16:53 0400 
On 11Mar2009, Ben Abbott wrote:
 Octave has two font paths that need to be set.

 GDFONTPATH sets the path for gdlib (bitmap canvases)

 GNUPLOT_FONTPATH sets the postscript fontpath for gnuplot

 I written a mfunction to construct each from info supplied by
 fontconfig. There may be a better way of doing this (I'm new to
 fontconfig).

 [GDFONTPATH, true_type_fonts] = fontpath_form_fontconf (".ttf");

 [GNUPLOT_FONTPATH, type_1_fonts] = fontpath_form_fontconf (".pfa");

 My thought is to set these environment variables, for each instance of
 gnuplot, each time gnuplot_drawnow opens a plot stream.

 For anyone willing to test this on their systems (Window's users are
 of greatest interest), I've attached both a changeset as well as the
 function itself.
If this is intended to be an internal function, then it should
probably be named __fontpath_from_fontconfig__.
if (! strcmp (font_suffix, prior_suffix))
if (nargin > 0)
[status, font_list] = system (sprintf ("fclist : file  grep '.%s'",
font_suffix));
else
[status, font_list] = system ("fclist : file");
endif
Don't you want to avoid depending on grep being available, for
Windows?
If you do use grep, then remember that . matches anything, so you
probably want '\\.' in the sprintf format string.
jwe
 Re: [changeset] print.m (matlab compatibility), (continued)
 Re: [changeset] print.m (matlab compatibility), Daniel J Sebald, 2009/03/10
 Re: [changeset] print.m (matlab compatibility), Shai Ayal, 2009/03/10
 Re: [changeset] print.m (matlab compatibility), Daniel J Sebald, 2009/03/10
 Re: [changeset] print.m (matlab compatibility), John W. Eaton, 2009/03/10
 Re: [changeset] print.m (matlab compatibility), Shai Ayal, 2009/03/10
 Re: [changeset] print.m (matlab compatibility), Michael Goffioul, 2009/03/10
 Re: [changeset] print.m (matlab compatibility), Ben Abbott, 2009/03/10
 Re: [changeset] print.m (matlab compatibility), Michael Goffioul, 2009/03/11
 Re: [changeset] print.m (matlab compatibility), Ben Abbott, 2009/03/11
 Re: fontpath from fontconfig: was > [changeset] print.m (matlab compatibility), Ben Abbott, 2009/03/11
 Re: fontpath from fontconfig: was > [changeset] print.m (matlab compatibility),
John W. Eaton <=
 Re: fontpath from fontconfig: was > [changeset] print.m (matlab compatibility), Ben Abbott, 2009/03/12
 Re: [changeset] print.m (matlab compatibility), Daniel J Sebald, 2009/03/12
 Re: gnuplot font specification  was > [changeset] print.m (matlab compatibility), Ben Abbott, 2009/03/15
 Re: gnuplot font specification  was > [changeset] print.m (matlab compatibility), Daniel J Sebald, 2009/03/15
 Re: [changeset] print.m (matlab compatibility), Thomas Weber, 2009/03/10
 Re: missing pdf terminal; was > [changeset] print.m (matlab compatibility), Ben Abbott, 2009/03/10