[cairo] Newbie questions on fonts

Baz brian.ewins at gmail.com
Wed Oct 17 19:44:47 PDT 2007

On 17/10/2007, Adrian Johnson <ajohnson at redneon.com> wrote:
> There is probably a bug in the TrueType subsetting somewhere as it
> should not be failing on fonts that FreeType can display. However I am
> unable to fix this unless I can reproduce the problem on Linux or
> someone on a Mac can find find out which line in cairo-truetype-subset.c

It turns out this wasn't a subsetting bug at all, but a limitation of
the toy api. ArialHHBold is 'Arial Hebrew'. Aagh...it really doesn't
have the glyphs for the string 'Magnetic', so we're getting .notdefs
back for all latin characters.

Fred - the toy api will only serve up the glyphs that exist in the
font. A fuller explanation of this issue is here:
In fact, your code works just fine, it was just an unlucky choice of font.

You can get proper font substitution by using pango with cairo. Here's
a couple of example programs using this combination:

Hope this helps,

More information about the cairo mailing list