I did some research and this is what I've found:
In pre-1.5.13 only some of text objects were not correctly rendered: either they were fuzzy antialiased or not antialiased at all. See these bugs for an example
http://bugs.winehq.org/show_bug.cgi?id=15180
http://bugs.winehq.org/show_bug.cgi?id=29240
As of wine 1.5.13 all text is not antialiased at all(FIX: aa is actually only done to sizes >=14 and <=6). I'm not completely sure how wine used to draw windows and its content previously, but now, according to the changelog
So, i checked out the sources and found this:Client-side window rendering is done using the DIB engine.
Issue1:
In file dlls/gdi32/font.c the function apparently responsible for deciding wether to do antialiasing or not is
Code: Select all
UINT get_font_aa_flags( HDC hdc )
Code: Select all
if ( get_gasp_flags( hdc, &gasp_flags ) && !(gasp_flags & GASP_DOGRAY)){
return GGO_BITMAP;
get_gasp_flags is quite a complex function and printf-style debugging approach does not work here and i havent yet figured out how to debug wine itself with gdb to see what exactly happens there when antialiasing is not done. I suppose that either gasp table is not read correctly, or font size is not correctly converted from current DC and applied to table.
Issue2:
When get_font_aa_flags function is forced to return GGO_GRAY4_BITMAP antialiasing is done but it looks weird(see screenshot). I did some research and found out that antialiasing strength(?) is controlled via applying a ramp array from dlls/gdi32/graphics.c
Code: Select all
static const BYTE ramp[17] =
{
0, 0x4d, 0x68, 0x7c,
0x8c, 0x9a, 0xa7, 0xb2,
0xbd, 0xc7, 0xd0, 0xd9,
0xe1, 0xe9, 0xf0, 0xf8,
0xff
};
I've noticed that font antialiasing problem does not really bother a lot of people out there but I really doubt that i am the only one who has it. It might not be that major compared to raw input and c++ runtime, although it's a rather annoying one at least for me.