fontpath from fontconfig: was -> [changeset] print.m (matlab compatibility)
Ben Abbott
bpabbott at mac.com
Wed Mar 11 07:57:12 CDT 2009
On Mar 11, 2009, at 3:44 PM, Ben Abbott wrote:
>
> On Mar 11, 2009, at 3:31 PM, Michael Goffioul wrote:
>
>> On Wed, Mar 11, 2009 at 2:12 AM, Ben Abbott <bpabbott at mac.com> wrote:
>>> It is available on OSX as well. There is a version bundled with
>>> X11, with
>>> other versions available from Fink and DarwinPorts.
>>>
>>> I'm able to get a list of all TrueType fonts by ...
>>>
>>> $ fc-list : file | grep '.ttf'
>>>
>>> Does this work on windows as well?
>>
>> Yes, provided that you are in a shell, to have "grep" under the hand.
>>
>> Michael.
>
>
> ok, that's good news!
>
> I was planning to handle the grep part in Octave.
>
> I'm nearly done with a function the uses fontconfig to produce a
> fontpath and a list of available fonts.
>
> When I'm done, I'll post it testing on other systems.
>
> Ben
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 m-function 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.
Ben
-------------- next part --------------
A non-text attachment was scrubbed...
Name: changeset-fontpath.patch
Type: application/octet-stream
Size: 3769 bytes
Desc: not available
Url : https://www-old.cae.wisc.edu/pipermail/octave-maintainers/attachments/20090311/ba127430/attachment.obj
-------------- next part --------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fontpath_from_fontconf.m
Type: application/octet-stream
Size: 2500 bytes
Desc: not available
Url : https://www-old.cae.wisc.edu/pipermail/octave-maintainers/attachments/20090311/ba127430/attachment-0001.obj
-------------- next part --------------
More information about the Octave-maintainers
mailing list