http://bugs.winehq.org/show_bug.cgi?id=7571
inckie@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #6419 is|0 |1 obsolete| |
------- Additional Comments From inckie@gmail.com 2007-27-06 14:53 ------- Created an attachment (id=6897) --> (http://bugs.winehq.org/attachment.cgi?id=6897&action=view) Handle DEFAULT_CHARSET in WineEngEnumFonts()
Scrap all that stuff of font enumeration order. See this:
Without patch: trace:font:WineEngEnumFonts [CDPG] Face=L"Lucida Sans Unicode", i=0, Charset=0 trace:font:WineEngEnumFonts [CDPG] Face=L"Lucida Sans Unicode", i=1, Charset=238 trace:font:WineEngEnumFonts [CDPG] Face=L"Lucida Sans Unicode", i=2, Charset=204 trace:font:WineEngEnumFonts [CDPG] Face=L"Lucida Sans Unicode", i=3, Charset=161 trace:font:WineEngEnumFonts [CDPG] Face=L"Lucida Sans Unicode", i=4, Charset=162 trace:font:WineEngEnumFonts [CDPG] Face=L"Lucida Sans Unicode", i=5, Charset=177 ... trace:font:WineEngEnumFonts [CDPG] Face=L"Segoe Script", i=0, Charset=0 trace:font:WineEngEnumFonts [CDPG] Face=L"Segoe Script", i=1, Charset=238 trace:font:WineEngEnumFonts [CDPG] Face=L"Segoe Script", i=2, Charset=204 trace:font:WineEngEnumFonts [CDPG] Face=L"Segoe Script", i=3, Charset=161 trace:font:WineEngEnumFonts [CDPG] Face=L"Segoe Script", i=4, Charset=162 trace:font:WineEngEnumFonts [CDPG] Face=L"Segoe Script", i=7, Charset=186 ... trace:font:WineEngEnumFonts [CDPG] Face=L"Times New Roman", i=0, Charset=0 trace:font:WineEngEnumFonts [CDPG] Face=L"Times New Roman", i=1, Charset=238 trace:font:WineEngEnumFonts [CDPG] Face=L"Times New Roman", i=2, Charset=204 trace:font:WineEngEnumFonts [CDPG] Face=L"Times New Roman", i=3, Charset=161 trace:font:WineEngEnumFonts [CDPG] Face=L"Times New Roman", i=4, Charset=162 trace:font:WineEngEnumFonts [CDPG] Face=L"Times New Roman", i=5, Charset=177 trace:font:WineEngEnumFonts [CDPG] Face=L"Times New Roman", i=6, Charset=178 trace:font:WineEngEnumFonts [CDPG] Face=L"Times New Roman", i=7, Charset=186 trace:font:WineEngEnumFonts [CDPG] Face=L"Times New Roman", i=8, Charset=163 trace:font:WineEngEnumFonts [CDPG] Face=L"Times New Roman", i=30, Charset=163
With patch: trace:font:WineEngEnumFonts [CDPG] Face=L"Lucida Sans Unicode", i=5, Charset=177 trace:font:WineEngEnumFonts [CDPG] Face=L"Lucida Sans Unicode", i=4, Charset=162 trace:font:WineEngEnumFonts [CDPG] Face=L"Lucida Sans Unicode", i=3, Charset=161 trace:font:WineEngEnumFonts [CDPG] Face=L"Lucida Sans Unicode", i=2, Charset=204 trace:font:WineEngEnumFonts [CDPG] Face=L"Lucida Sans Unicode", i=1, Charset=238 trace:font:WineEngEnumFonts [CDPG] Face=L"Lucida Sans Unicode", i=0, Charset=0 ... trace:font:WineEngEnumFonts [CDPG] Face=L"Segoe Script", i=7, Charset=186 trace:font:WineEngEnumFonts [CDPG] Face=L"Segoe Script", i=4, Charset=162 trace:font:WineEngEnumFonts [CDPG] Face=L"Segoe Script", i=3, Charset=161 trace:font:WineEngEnumFonts [CDPG] Face=L"Segoe Script", i=2, Charset=204 trace:font:WineEngEnumFonts [CDPG] Face=L"Segoe Script", i=1, Charset=238 trace:font:WineEngEnumFonts [CDPG] Face=L"Segoe Script", i=0, Charset=0 ... trace:font:WineEngEnumFonts [CDPG] Face=L"Times New Roman", i=30, Charset=0 trace:font:WineEngEnumFonts [CDPG] Face=L"Times New Roman", i=8, Charset=163 trace:font:WineEngEnumFonts [CDPG] Face=L"Times New Roman", i=7, Charset=186 trace:font:WineEngEnumFonts [CDPG] Face=L"Times New Roman", i=6, Charset=178 trace:font:WineEngEnumFonts [CDPG] Face=L"Times New Roman", i=5, Charset=177 trace:font:WineEngEnumFonts [CDPG] Face=L"Times New Roman", i=4, Charset=162 trace:font:WineEngEnumFonts [CDPG] Face=L"Times New Roman", i=3, Charset=161 trace:font:WineEngEnumFonts [CDPG] Face=L"Times New Roman", i=2, Charset=204 trace:font:WineEngEnumFonts [CDPG] Face=L"Times New Roman", i=1, Charset=238 trace:font:WineEngEnumFonts [CDPG] Face=L"Times New Roman", i=0, Charset=0
That means that the FONT_SIGNATURE for Times New Roman has bit 30 set in its fsCsb. (According to MSDN [1], bit 30 is reserved by system.) As you can see, this is the reason for the repetition and why my patch changed which was the repeated enumerated charset.
OTOH, as Segoe Script has no bit set beyond bit 8, it doesnt repeat anything. However this shows that this isnt simply a matter of the order of the enumeration, since reversing the loop didnt fix Notes.
So, it seems to me that the if(csi.ciCharset != DEFAULT_CHARSET) in the codepage loop in WineEngEnumFonts() is missing an else. With this patch, I dont need to reverse the loop.
Next Ill send a tarball with a full +font,+xrender log, plus the corresponding Notes screenshot showing a faulty string.