[PATCH] gdi32: Initialize system font link registry.
Qian Hong
qhong at codeweavers.com
Wed Nov 4 07:40:38 CST 2015
Hi,
Some applications (Tencent QQ) explicitly query system font link
registry value, this patch fix a Tencent QQ Chinese rendering bug.
On Windows, system font link registry value is updated according to
locale changing when rebooting. If a user modify font link registry
value without changing locale, then the custom setting will be present
after next reboot. If locale is changed, then after next reboot, the
custom setting will be overwritten by system default value. If a user
adds additional registry key to system link path, then that custom key
will be present forever no matter how locale changes. This patch copies
the same behavior.
The actual font link values are different between different Windows
version, this patch follows what Windows 7 behaviors, while adjusting
Traditional Chinese system link in order to match Wine's current code:
we use MS UI Gothic as Japanese fallback for Traditional Chinese, but
Windows 7 use MS MinCho as Japanese fallback for Traditional Chinese.
Since different Windows version already has different setting, I think
it is safe to assume this detail won't hurt real world applications.
I'm glad to add test case if it is required, but test registry value
seems not a good idea in general, in additional different Windows
already have different value, so I just done manually testing only.
Tested on Windows 7 with Simplified Chinese, Traditional Chinese,
Japanese, Korean, English (US), Arabic, Russian and France.
It seems there are more than one way to implement this, for example
inserting Registry query/set code into populate_system_links() might do
the same thing (actually maybe more). I'm not sure which way is
preferred, I sent my preferred version, but I'm glad to try different
way if there is any feedback.
This patch could make some of current code related to
font_links_defaults_list[] not very necessary now, but I'm hesitate to
remove them between code freeze, this patch itself shouldn't be too harmful.
Thanks for review!
Signed-off-by: Qian Hong <qhong at codeweavers.com>
---
dlls/gdi32/freetype.c | 63
++++++++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 62 insertions(+), 1 deletion(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-gdi32-Initialize-system-font-link-registry.txt
Type: text/x-patch
Size: 3660 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20151104/7f52f4b7/attachment.bin>
More information about the wine-patches
mailing list