[cairo] xlib backend mis-draws fonts with partial bitmap strike
Keith Packard
keithp at keithp.com
Tue Oct 30 00:05:29 PDT 2007
Sazanami Mincho is a Japanese font which offers several bitmap strikes,
however coverage of those strikes is not complete. If the first glyph
has a bitmap version, cairo assumes that all of the glyphs will and
creates the font in A1 format. However, glyphs which do not have bitmap
strikes will get mis-rendered as they are first drawn to an A8 image and
then poorly copied to A1. However, if the first glyph does not have a
bitmap strike, it will be drawn anti-aliased, and all of the remaining
glyphs will end up getting copied to an A8 surface.
It seems like we have three options:
1) Identify bitmap strike sizes and draw all glyphs as A1 surfaces.
2) Draw bitmap glyphs as bitmaps and other glyphs as A8 surfaces.
3) Identify whether a bitmap strike is complete and if not, create
all glyphs as A8 glyphs in case a non-bitmap glyph is requested.
The first would require that we discover bitmap strikes in the FreeType
backend and turn off the antialias flag. I think this is fairly simple
to do.
The second would require splitting the font into two objects; XRender
glyphsets can only be in a single format. This seems like slightly more
work, but certainly not impossible.
The third seems crazy; eliminating all benefit of bitmap strikes for at
least this font.
--
keith.packard at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.cairographics.org/archives/cairo/attachments/20071030/a42bb5b2/attachment.pgp
More information about the cairo
mailing list