[cairo] PDF text doesn't render

Kristian Høgsberg krh at bitplanet.net
Tue Sep 25 10:13:11 PDT 2007


On 9/22/07, Baz <brian.ewins at gmail.com> wrote:
> On 23/09/2007, Behdad Esfahbod <behdad at behdad.org> wrote:
> > That patch sure looks fine, though another option would be to fix that
> > file to work with other font backends too...
> >
>
> Ok -pushed. You're right, fixing this properly would be better; it
> seems that everything we need we already have except a replacement for
> FT_Get_Glyph_Name. I'll play around.

Oh, heh, that's one of my old TODO-items.  I started out using
freetype for most of the type1 subsetting, but when I was done, most
of the code just accessed the type1 file directly.  I always intended
to get rid of the remaining FT calls...  Anyways, it shouldn't be too
difficult to extend the code to parse the glyph names and avoid the FT
dependency here.

> btw there's another call to FT_Load_Glyph in the type1-subset code
> that can return CAIRO_STATUS_NO_MEMORY.  I'm not sure if this would
> actually happen ie if we had an error loading a glyph to show it, will
> we still try to use it in the subset? And if we don't find any glyph
> info, and tried to ignore that error, what would end up in the subset?

Calling FT_Load_Glyph here is overkill, since we just need the width
and the name of the glyph.  Getting rid of the freetype dependency
here will probably eliminate a couple of error paths too.  Are you
working on a patch now?

cheers,
Kristiani


More information about the cairo mailing list