RE: Load a font from a specific path



Behdad,
Thanks for the information--I'll start looking into the fontconfig stuff then.

Any thoughts on the enhancement request #347237, which would solve my issues very handily?


-bob

Meddle not in the affairs of wizards, for they are subtle and
quick to anger.
**********************************************************************
   Robert Kerr, Member of the Cubit Mesh Generation Team
   rakerr sandia gov          |    PO Box 5800,  MS 0376
   Phone: (505) 844-8606    |    Sandia National Labs
   Fax: (505) 284-0140        |  Albuquerque, NM 87185-0376
**********************************************************************

-----Original Message-----
From: Behdad Esfahbod [mailto:behdad esfahbod gmail com] On Behalf Of Behdad Esfahbod
Sent: Tuesday, February 17, 2009 5:10 PM
To: Kerr, Robert
Cc: gtk-i18n-list gnome org
Subject: Re: Load a font from a specific path

Robert Kerr wrote:
> Hi all,
> I was browsing the archives of the mailing list, and found an email that
> asked the same question I'm interested in:
> http://mail.gnome.org/archives/gtk-i18n-list/2008-June/msg00015.html
>
> It's entitled: Load a font from a specific file path
>
> Anyway, the gist of it is that I want to be able to specify that a given
> application, which uses pango for its fonting capabilities, have the
> capability to use a font file that is distributed with the application.
> This is important in our testing mechanism, because some of our tests
> are based on graphics output, and if we allow the system to pick the
> "closest" font, then the graphics won't necessarily be identical.
>
> Anyway, after reading through the discussion about the above-listed
> question, it seems that there isn't an easy way to do this yet.  Is that
> correct?
>
> And if so, is there a slightly-less-easy way of doing it?

Other than what was pointed out to you, you can use FcConfigAppFontAddFont()
before calling into Pango.  Needless to say, that only works with the
fontconfig backend of pango.

behdad


> Thanks
>




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