4

Scenario:

A UI Interface element appears to use a different font on US English Windows 7 Enterprise compared to "Chinese" Windows 7 Enterprise even with all localization packs and languages set to English. In the WinForms codebehind, the FontFamily is not explicitly defined and relies on the defaults.

English:

English

Chinese:

Chinese

Several questions:

1) What is the font used in the Chinese Windows?
2) What is different about such an install that would cause it to use that font?
3) How do I set up an environment to replicate this? Is it an install time option on Windows 7 that one does not get when switching UI and System Culture on an already installed Windows 7 instance?

FWIW:

I checked C:\Windows\Fonts and it has the same version and size of "Microsoft Sans Serif Regular"

TodK
  • 1,079
  • 10
  • 17
  • 2
    Guys, why you think it is not programming related? I am pretty sure that this is standard i18n-programming question. – Paweł Dyda Aug 12 '11 at 20:23
  • Show me where in this post it talks at all about *anything* in the context of programming. It talks about installing software in different versions of Windows. – Joe Aug 14 '11 at 19:53
  • Here are a few resources for anyone dealing with i18n and Localization: http://blogs.msdn.com/b/michkap/archive/2007/12/17/6784443.aspx http://msdn.microsoft.com/en-us/goglobal/ee461121#LocalizationExceptionswithLanguagePacks – TodK Aug 16 '11 at 20:22
  • 2
    Just FYI, the font shown is [`PMingLiu` (新細明體)](http://www.microsoft.com/typography/fonts/family.aspx?FID=36), commonly used in **traditional** Chinese. For simplified Chinese, the font is `SimSun`. Notice that for font sizes small enough, they will use the embedded bitmap glyphs. – Alvin Wong Apr 03 '13 at 16:13

1 Answers1

5

If you haven't done anything to your fonts, default font fall-back mechanism would probably use SimSun as a font replacement for your standard font.

The reason why font is replaced, is that default font on Chinese OS needs to display Chinese characters. And of course due to sheer size, MS Sans Serif does not have Chinese glyphs defined.

To avoid the problem, you might want to "hardcode" font information in resource files – usually simple size modification (i.e. setting 9 instead 8.25) helps. Please be aware, however that if you do that, Chinese characters might appear corrupted – if I recall it correctly it will turn-off font fall-back mechanism completely. It might be appropriate for "static" UI elements that are not going to be translated to Chinese but would be totally unacceptable for text boxes and similar controls which allow users to enter free-form text.

Instead of fighting the rendering issues, it is best to just let it pass. I am sure that Chinese users are simply used to that specific look & feel.

Paweł Dyda
  • 18,366
  • 7
  • 57
  • 79
  • 1
    this issue is resolved by hard coding the 'default english' UI font (Microsoft Sans Serif) into the form/controls. – TodK Aug 15 '11 at 14:13
  • 1
    @TodK: Yes, it will "resolve" this issue, but hollow boxes might appear if user enter non-ASCII characters. – Paweł Dyda Aug 15 '11 at 14:17
  • Makes sense - the area where I made the changes were non-input. Thanks! – TodK Aug 15 '11 at 17:08
  • @Paweł Dyda: Why is size 9 preferable to size 8.25? Should I replace my Microsoft Sans Serif 8.25 font with Microsoft Sans Serif 9 for better compatibility worldwide generally? – Dan W Feb 10 '13 at 14:51
  • @DanW: To be honest, I don't recommend modifying the fonts at all. It was meant to be an example of what you can do to prevent changing the font face in your Winforms application across different language versions of Windows. – Paweł Dyda Feb 10 '13 at 16:43