[cairo] Surface error not set when using cairo_show_text() with invalid utf8

cu cairouser at yahoo.com
Mon Nov 1 11:31:20 PDT 2010


As the subject says,  looks like cairo_show_text() does not set the
surface error (to be queried later by cairo_surface_status()) when
provided invalid utf8 input (doesn't matter what it is - just has to be
something that can't be properly decoded). Surface will not allow any
more operations (i.e. any subsequent drawing is discarded) but at the
same time status is still reported as "success". This is tested with
cairo 1.9.8.

Ideally I would prefer that surface would continue working after this
error (since the error is in external data and seems to be caught early
by utf8 validation function  _cairo_utf8_to_ucs4). But at a very least,
surface that can no longer be drawn into should be properly marked as such.


More information about the cairo mailing list