octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: fontpath from fontconfig: was -> [changeset] print.m (matlab compati


From: Ben Abbott
Subject: Re: fontpath from fontconfig: was -> [changeset] print.m (matlab compatibility)
Date: Wed, 11 Mar 2009 20:57:12 +0800


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 <address@hidden> 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

Attachment: changeset-fontpath.patch
Description: Binary data



Attachment: fontpath_from_fontconf.m
Description: Binary data






reply via email to

[Prev in Thread] Current Thread [Next in Thread]