http://bugs.winehq.org/show_bug.cgi?id=4065
Zhangrong Huang hzhrong@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |hzhrong@gmail.com
--- Comment #13 from Zhangrong Huang hzhrong@gmail.com 2008-06-12 10:31:27 --- (In reply to comment #6)
What the problem seems to be that the font had its charset set to DEFAULT_CHARSET or ANSI_CHARSET, as a result, no proper charset translation can be established.
http://source.winehq.org/source/dlls/gdi32/freetype.c#L3170
I believe what should be done is: if( lf.lfCharSet == DEFAULT_CHARSET || lf.lfCharSet == ANSI_CHARSET) { lf.lfCharSet = get_default_charset(); }
It's wrong fix, we couldn't change lfCharSet here.
In this case, after creating fonts with DEFAULT_CHARSET or ANSI_CHARSET, when drawing text, GdiGetCodePage(hdc) returns incorrect codepage. for example, on Simplified Chinese env, GdiGetCodePage(hdc) should return codepage 936 instead of 1251(directly from lfCharSet).
I'll submit a test-case for GdiGetCodePage to demonstrate that.
or it could be solved in some higher level where the hfont was first created.
see also bug #5506