Re: Using Pango without FontConfig?

Hi Dave,

The easiest way to use Pango / pango-view for a font website is to use custom
fontconfig config to make only the desired font available.  Then you don't
even have to specify a font anymore!

This is actually easier than I had expected.  Here it goes:

Create a directory, put your font in there, and put the following fonts.conf
file in there:

$ cat fonts.conf
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">

Now chdir into that directory and run:

$ FONTCONFIG_PATH=. pango-view --text test



On 05/14/2010 04:35 PM, Dave Crossland wrote:
> Hi!
> I'm working on the Open Font Library with Pierre Marchand, and the
> Pango-based PNG-generating font preview system we have -
> - is not working for font families with unusual family naming schemas
> - because it depends on FontConfig.
> I believe that the relevant feature request is already in the tracker
> for a long time:
> And I guess that we ought to drop PangoCairoFontPlayground.c as today
> it is essentially a simple version of pango-view.
> To be clear about what I would like, pango-view currently works like this:
> $ pango-view --output=a.png --text="123 Handshoveling spam? OH
> nononono" --font="Junction" --height=500 --dpi=200
> What I would like is to run it like this:
> $ pango-view --output=a.png --text="123 Handshoveling spam? OH
> nononono" --font-file="Junction.ttf" --height=500 --dpi=200
> For that to work, Pango would need a patch to use a font directly,
> without going via FontConfig.
> (I also wonder if is
> related, the so-called "web fonts bug," and since webfonts are now
> working well, I wonder how easy it will be to fix bug #95043 too :-)
> Cheers
> Dave

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