http://bugs.winehq.org/show_bug.cgi?id=36867
Bug ID: 36867 Summary: Localization bug in gdi32 font.c test Product: Wine Version: 1.7.21 Hardware: x86 OS: Linux Status: NEW Severity: normal Priority: P2 Component: gdi32 Assignee: wine-bugs@winehq.org Reporter: stefan@codeweavers.com
gdi32/tests/font.c fails with LANG=de_AT.UTF-8:
font.c:4917: Test failed: Arial: font face names don't match: returned Arial Fett, expect Arial Bold font.c:4927: Test failed: Arial: style names don't match: returned Fett, expect Bold
"Fett" in this context means "Bold" in German.
with LANG=en_US.UTF-8 the test works. (Well, I'm running into bug 36233, but that's a different story)
http://bugs.winehq.org/show_bug.cgi?id=36867
Qian Hong fracting@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |fracting@gmail.com
--- Comment #1 from Qian Hong fracting@gmail.com --- Hi Stefan, thanks for reporting.
I can't reproduce, could you attach a +tid,+font trace? Could you also check if you have multiple Arial fonts installed on your system? (Either /usr/share/fonts/* or ~/.wine/drive_c/windows/Fonts or any other path which affects Wine)
http://bugs.winehq.org/show_bug.cgi?id=36867
--- Comment #2 from Stefan Dösinger stefan@codeweavers.com --- Created attachment 48962 --> http://bugs.winehq.org/attachment.cgi?id=48962 font,tid log
The log is attached.
$ find /usr/share/fonts -iname *arial* /usr/share/fonts/corefonts/ariali.ttf /usr/share/fonts/corefonts/arialbi.ttf /usr/share/fonts/corefonts/arial.ttf /usr/share/fonts/corefonts/arialbd.ttf
No fonts in C:\windows\fonts. This is a fresh prefix.
My guess is that you do not have the German locale data installed. Does "LANG=de_AT.UTF-8 ls --help" write German text?
http://bugs.winehq.org/show_bug.cgi?id=36867
--- Comment #3 from Qian Hong fracting@gmail.com ---
My guess is that you do not have the German locale data installed. Does "LANG=de_AT.UTF-8 ls --help" write German text?
Good catch Stefan, I installed the German locale data and can reproduce the bug now.
Interesting, it works fine with de_DE.UTF-8 and de_BE.UTF-8 but fails with de_AT.UTF-8, de_CH.UTF-8, de_LI.UTF-8 and de_LU.UTF-8.
I guess it is a false regression introduced by: commit b05b637c9179b7b01f21f5fd80e46cf405c04419 Author: Alexandre Julliard julliard@winehq.org Date: Thu Jun 20 13:36:34 2013 +0200
gdi32: Improve font name localization by not requiring a strict language match.
What we need to do is porting the matching algorithm from gdi32/freetype.c:match_name_table_language() to gdi32/tests/font.c to make sure the algorithm match with each other in both test and implementation, as far as we can make sure the implementation is correct comparing to Windows.
Stefan, do you know if there is any locale equaling to de_AT.UTF-8/de_CH.UTF-8/de_LI.UTF-8/de_LU.UTF-8 on Windows? Could you run the Wine font test suite on such a Windows system?
Cheers :)
http://bugs.winehq.org/show_bug.cgi?id=36867
--- Comment #4 from Stefan Dösinger stefan@codeweavers.com --- Created attachment 48963 --> http://bugs.winehq.org/attachment.cgi?id=48963 Windows 7 test run
I ran the test on a Windows 7 installation that's installed from a Win7 dvd sold in local retail stores. It fails in the same way:
font.c:4917: Test failed: Arial: font face names don't match: returned Arial Fett, expect Arial Bold
I am not sure how language specifications work exactly in Windows. In the region and language settings ("Region und Sprache", not sure what it's called in english Windows) I have the setting "Deutsch (Österreich)". In english this would be "German (Austria)". Setting this to "Deutsch (Deutschland)" aka "German (Germany)" does not fix the test failures.
Note that even if I configure my Windows to an English locale all the text is still German. It's not one of those Windows Ultimate installations that ships all the language packs.
http://bugs.winehq.org/show_bug.cgi?id=36867
--- Comment #5 from Stefan Dösinger stefan@codeweavers.com --- I set all possible settings to English (USA), but Windows still returns German font names. I guess that's somewhat expected as all the other text is still in German. The clock in the taskbar now writes 5:37 PM though instead of 17:37.
http://bugs.winehq.org/show_bug.cgi?id=36867
--- Comment #6 from Qian Hong fracting@gmail.com --- (In reply to Stefan Dösinger from comment #5)
I set all possible settings to English (USA), but Windows still returns German font names. I guess that's somewhat expected as all the other text is still in German. The clock in the taskbar now writes 5:37 PM though instead of 17:37.
On Windows, usually we need a reboot to make sure all language setting working.
http://bugs.winehq.org/show_bug.cgi?id=36867
--- Comment #7 from Stefan Dösinger stefan@codeweavers.com --- I rebooted every time I changed the settings.
http://bugs.winehq.org/show_bug.cgi?id=36867
--- Comment #8 from Qian Hong fracting@gmail.com --- (In reply to Stefan Dösinger from comment #7)
I rebooted every time I changed the settings.
Ah, I see, maybe this help http://windows.microsoft.com/en-us/windows/change-system-locale#1TC=windows-...
Could you also check if changing 'language for non-Unicode programs/Change system locale' helps?
Cheers :)
http://bugs.winehq.org/show_bug.cgi?id=36867
--- Comment #9 from Qian Hong fracting@gmail.com --- Created attachment 48965 --> http://bugs.winehq.org/attachment.cgi?id=48965 Proposal patch: gdi32/tests: Improve font name localization by not requiring a strict language match.
Hi, Stefan, This patch fix all related failure on all German locales on Wine for me, could you test it on both Windows and Wine? Thanks!
http://bugs.winehq.org/show_bug.cgi?id=36867
--- Comment #10 from Stefan Dösinger stefan@codeweavers.com --- The patch fixes the problems on Windows and Linux for me.
In my previous testing I did try to change the locale for non-Unicode programs. It did not affect the test.
http://bugs.winehq.org/show_bug.cgi?id=36867
--- Comment #11 from Qian Hong fracting@gmail.com --- (In reply to Stefan Dösinger from comment #10)
The patch fixes the problems on Windows and Linux for me.
In my previous testing I did try to change the locale for non-Unicode programs. It did not affect the test.
Thanks for testing! Patch sent: http://source.winehq.org/patches/data/105511
http://bugs.winehq.org/show_bug.cgi?id=36867
Qian Hong fracting@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |887a6832bb6e70c5813da7dd65c | |b89a7eb17ce64 Status|NEW |RESOLVED Resolution|--- |FIXED
--- Comment #12 from Qian Hong fracting@gmail.com --- Patch committed.
https://bugs.winehq.org/show_bug.cgi?id=36867
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #13 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 1.7.22.