[cairo] Error handling in cairo_type1_font_subset_get_glyph_names_and_widths
mozilla at weilbacher.org
Wed Nov 12 03:33:35 PST 2008
On 02.11.2008 12:27, Adrian Johnson wrote:
> The second sentence "only get the widths for the glyphs that are
> actually used" is what will fix your bug. The first sentence has more to
> do with eliminating the FreeType dependency in type1-subset. If
> _cairo_scaled_glyph_lookup() fails or returns the wrong metrics your
> font will not display correctly on the screen at which point you would
> want to replace the font.
> I've pushed out the simple fix - falling back to type1-fallback if it fails:
Didn't have time to post about this before, but this was the workaround that
I had tried earlier, and actually it made matters worse. I haven't investigated
why, but if it encounters the problematic glyph I get a crash when I test this
in my original testcase with Firefox on OS/2, where before I got the error
message and a garbled PDF.
Just as a warning for now, that more is to come on this issue...
Luckily, the problem with this font was acknowledged and fixed in FreeType,
something I also still have to test.
More information about the cairo