[cairo] Problem with text rendering on Win32+ClearType, and
possible fix
Tor Lillqvist
tml at iki.fi
Thu Oct 5 10:36:13 PDT 2006
> If someone (Tor?) sends a patch for 1.2.4, I'll include it in the
> upcoming 1.2.6 release.
I was going to answer that it would be this simple then, the "large
hammer" approach that Owen said might be the right way:
--- ../1.2.4/src/cairo-win32-surface.c Thu Aug 10 23:14:46 2006
+++ src/cairo-win32-surface.c Thu Oct 5 20:16:16 2006
@@ -1116,7 +1116,7 @@ cairo_win32_surface_create (HDC hdc)
if (GetDeviceCaps(hdc, TECHNOLOGY) == DT_RASDISPLAY) {
depth = GetDeviceCaps(hdc, BITSPIXEL);
if (depth == 32)
- format = CAIRO_FORMAT_ARGB32;
+ format = CAIRO_FORMAT_RGB24;
else if (depth == 24)
format = CAIRO_FORMAT_RGB24;
else if (depth == 16)
But then I thought, heck, I really should do at least a little
regression testing to check that this doesn't have any unintended bad
side-effects
And guess what... everything else seems to work fine, but with this
simple change, "Rotated Text" in gtk-demo goes haywire... see
http://www.saunalahti.fi/tlillqvi/rotated-text.png . I just noticed
this and haven't looked for the cause yet.
So I don't know. Maybe after all the patch in my message that started
this thread is better?
--tml
More information about the cairo
mailing list