[cairo] Fix for bitmap-font failure (don't generate a Type 1 font)
cworth at cworth.org
Thu Sep 7 17:54:58 PDT 2006
When the Type 1 font generation code was recently merged it broke the
bitmap-font test for both the ps and pdf backends. (Kristian and
Adrian, shame on you both for not running "make test" with the new
I've now fixed that test by simply making the code in
cairo-type1-fallback.c be more careful about checking return
values. When it calls _cairo_scaled_glyph_lookup and asks for a path
with CAIRO_SCALED_GLYPH_INFO_PATH, that call may return an UNSUPPORTED
status value, (in the case of a bitmapped glyph with no path
So, by now consistently returning that UNSUPPORTED value all the way
out, both the ps and pdf backends will now fallback to type 3 fonts
instead and things work.
I haven't yet checked that the type1-fallback code is careful to not
introduce any undesired side effects in this case, (since it appears
to perhaps have done some non-trivial work before it notices the
problem and starts bailing out). So someone should do an audit there.
Also, it's worth auditing this code for other return value checks
(such as out-of-memory). I fixed a couple while I was in the code, but
I didn't audit everything.
PS. Bryce, your systems that have been reporting 1 test failure should
now start reporting 0 as soon as this fix gets picked up (its commit
ID is c475d2ca69fa8fbdf1c50f1d5d1b6b558b8fd6cd ).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20060907/95ac89a5/attachment.pgp
More information about the cairo