[cairo] error handling

Baz brian.ewins at gmail.com
Sat May 26 16:47:53 PDT 2007

I had a hard-to-find problem today where glyph measurements were
running unexpectedly fast. The root cause was a misinterpreted error
from FT_Load_Glyph (FT_Err_Invalid_Argument) being reported as
CAIRO_STATUS_NO_MEMORY. This made it up as far as the scaled font,
where it was stored in the status.

However... the caller was _cairo_gstate_glyph_extents, which just
returns CAIRO_STATUS_SUCCESS. Is this intentional, or just something
that needs tidied up? The manual says ' Errors propagate from object
to object. Setting a pattern in an out-of-memory state as the source
of a cairo_t puts the type into an error state....Much of the above is
not yet implemented at the time of this writing' which would suggest
that its something thats on the list to fix? Or is it considered to
severe to have a bad glyph stop all drawing?


More information about the cairo mailing list