[cairo] PDF text doesn't render

Baz brian.ewins at gmail.com
Sun Sep 23 13:31:05 PDT 2007


On 22/09/2007, Baz <brian.ewins at gmail.com> wrote:
> Adam -
> Going back to the original test - can I ask what the configure flags
> were on this build of cairo? And what FT version you have installed?
> I'm seeing something odd here. When I build with atsui disabled, I see
> the text; with freetype disabled, and atsui enabled, I see the text;
> but with both atsui and freetype enabled (which is what happens when
> you do --enable-atsui), I get a crash in FreeType.

Something else I noticed, is that the text doesn't show when the font
is 'Times' and FT only is enabled. This ends up resolving to
Times.dfont, and gets a fatal out of memory error calling FT_New_Face.
It seems this is the case for all .dfont files, eg Courier fails too,
but not Vera Sans (.ttf). FT has some dfont support - but afaik only
for the first font in the file - so out of curiosity I changed the
font selection to
  cairo_select_font_face (cr, "Times", CAIRO_FONT_SLANT_NORMAL,
                                             CAIRO_FONT_WEIGHT_NORMAL);
... and hey presto, the text displayed.  So this looks like a problem
with ft and dfont files using anything other than the 'normal' face.

This can't be Adam's problem though, since he manages to generate a
pdf that works in other viewers; the out of memory error with this bug
means the text isnt written at all.

I still havent managed to reproduce the original bug. Any more details
Adam (configure flags, freetype version)?

Cheers,
Baz


More information about the cairo mailing list