[cairo] Handling invalid glyphs

Baz brian.ewins at gmail.com
Tue Sep 11 16:52:37 PDT 2007


On 11/09/2007, Behdad Esfahbod <behdad at behdad.org> wrote:
> Objections?  Brian, do you want to fix the Quartz backend?  No idea
> what's the status of win32.

I tried the patch with ft+quartz, works for me (test case is
test/text-glyph-range.c with one of the glyph ids changed to 0xcFFF,
this reproduces the OOM error)

The atsui side of things doesn't need a similar fix, it silently
renders 'missing' glyphs as if they had glyph id 0 - a box - and
measures them that way too. Not ideal behaviour maybe, but not
crashing.

Reviewing the patch...if the value in 'glyph = face->glyph;' is being
left somewhat random because of the error, you could always do what
apple are doing, and do a second call to load in glyph id 0 there.

Baz


More information about the cairo mailing list