This is similar to a change that was recently made to the PDF and PS backends.
Bitmap glyphs are not yet drawn correctly, (drawn as filled rectangles instead),
but the crash is at least eliminated.
This uses a technique devised by Sean Anderson, July 13, 2001 as found
at http://graphics.stanford.edu/~seander/bithacks.html#ReverseByteWith32Bits
This technique uses 3 multiplies rather than just shifts and masks, but
performance seems comparable to the old approach, (but more significantly,
the new approach is easier to implement as a macro, and I plan to start
using this bit-swapping elsewhere very soon).
This was a gratuitous thing that was causing excessive fallbacks in
mozilla printing to PDF. The only reason it was ever there was to
get some of the tests that rely on CAIRO_ANTIALIAS_NONE to pass.
Instead we now simply don't run those tests against the PDF backend.
cairo freetype font backend doesn't handle fontconfig configurations
quiet well, it always renders glyphs using configurations in
scaled_font->base.options which usually isn't corresponding to
font pattern used to create the font face and the load flags. As a
result, turning antialias off with fontconfig doesn't work with cairo
HEAD, subpixel order either.
This commit make cairo respect configurations in font pattern and handle
load flags correctly. The ft-text-antialias-none test case passess now.
And should fix bug #6759 and #4792.
Previously, using the ps or pdf backend with a bitmapped font would
result in a coorupt output file, filled with uninitialized values and
missing procedures for drawing the glyphs.
Now, the file should actually be valid, but it's simply drawing black
boxes instead of the correct glyphs.
This allows graceful recovery when first requesting a path from a font
that only supports bitmapped glyph. The changed return type is also
pushed down into the scaled_glyph_init function of the
cairo_scaled_font backend.
The aliases should allow binaries with the old symbols to continue to run.
Meanwhile, the macros in cairo.h prevent any code from being compiled without
using the new, future-proof function names.
This is a temporary, transition strategy and the aliases will be dropped
before the next major release.