[cairo] Problem with text rendering on Win32+ClearType, and possible fix

Stuart Parmenter stuartp at gmail.com
Fri Oct 6 10:54:21 PDT 2006


> Still, I don't really understand the reasoning behind having
> _cairo_win32_surface_show_glyphs at all...
>

Basically to avoid the pointless extra mallocs, arrays, and more
importantly the extra SaveDC()/RestoreDC().  Yes, they do show up on
profiles.  I'd like to be able to avoid the extra SaveDC/RestoreDC in
_cairo_win32_surface_show_glyphs, but without making some assumptions
they're hard to remove.  We're able to determine those assumptions in
our code and in that case we simply avoid calling _show_glyphs
entirely. (basically only for very simple text).  We use this
(_cairo_win32_surface_show_glyphs) fast path for the large majority of
our text only hitting the software fallback in extreme conditions.

stuart


More information about the cairo mailing list