Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
471 views
in Technique[技术] by (71.8m points)

c# - Microsoft Sans Serif Font not used in Chinese Localized Windows

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:WindowsFonts and it has the same version and size of "Microsoft Sans Serif Regular"

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...