[Fontconfig] Application fonts with Pango+fontconfig

Khaled Hosny khaledhosny at eglug.org
Sun May 10 12:10:12 PDT 2015


On Fri, May 01, 2015 at 07:19:11PM -0400, Behdad Esfahbod wrote:
> Hi all,
> 
> I am at the Libre Graphics Meeting in Toronto this week, which meant that I
> got to talk to GIMP and Inkscape developers after many years, and was reminded
> that Pango still doesn't make it easy to use custom (aka application fonts),
> and it still does not allow one to turn OpenType features on or off.  So I
> ended up doing a complete review of the stack, fixed small stuff, filed many
> bugs, and documented it all.  Details here:
> 
> http://mces.blogspot.ca/2015/05/how-to-use-custom-application-fonts.html
> 
> Hopefully we can make the next release of the stack much better, and work with
> app developers to integrate these.

I gave it a try[1] and it seems to work for my use case (I don’t even
need to select a Pango font, since might is the only one Pango seems to
just pick it), with one glitch: If the font gets changed while the
viewer is open (e.g. adding or removing glyphs), Pango will start
drawing garbage glyphs (seems to be using the old glyph indices) even
though I recreate the config, fontmap, layout and everything. This is
specially important for this application as I use it to test fonts while
I’m working on them, not sure if it is that relevant for common use
cases.

This seems to be a general Pango issue, if I modify a font while
an application is using it, I get similar issues. 

Regards,
Khaled

1. https://github.com/khaledhosny/fontview/commit/0353750


More information about the Fontconfig mailing list