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

Bill Spitzak spitzak at gmail.com
Wed Nov 3 11:12:00 PDT 2010

Behdad Esfahbod wrote:
> On 11/02/10 23:54, cu wrote:
>> But with current behavior programmer (me) doesn't get a chance to fix
>> the error! First of all it is not even set correctly (that's a *bug* and
>> it needs to be fixed) - so as a programmer I don't even get notified of
>> an error. The only way I see that there was an error is because my cairo
>> image is half-empty!
> You are supposed to check *before* calling cairo.  Many programmers /
> applications for example always check text for validity at the point that it
> enters their module.  Cairo does so.  You should do so too.

I'm sorry but that is just a load of B***. Any "check" can be run 
WHETHER OR NOT the API will draw it. If the intentions is "get as much 
of this text as possible onto the screen so the user can figure out what 
is going on" then this API is useless, and no "check" is going to help.

Stop making excuses for an API that is obviously not doing what is 
needed and FIX

More information about the cairo mailing list