[cairo] xlib backend mis-draws fonts with partial bitmap strike
Luo Jinghua
sunmoon1997 at gmail.com
Wed Dec 12 18:37:29 PST 2007
On Oct 30, 2007 3:05 PM, Keith Packard <keithp at keithp.com> wrote:
> 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.
>
> I implemented option 2 in 2006, but was rejected due to its 'complexity'。I
attach my old patch here,
obviously, it will not be applied any more, that file has been changed a lot
:).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.cairographics.org/archives/cairo/attachments/20071213/214713da/attachment.html
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: cairo-xlib-use-multi-glyphset-per-font.diff
Url: http://lists.cairographics.org/archives/cairo/attachments/20071213/214713da/attachment.txt
More information about the cairo
mailing list