土人汇报下今天发现的2种神奇的字体。。。

 

MS Shell Dlg and MS Shell Dlg 2

Font substitution is of interest in the localization process because of two font face names: MS Shell Dlg and MS Shell Dlg 2. These font face names are set to different fonts for different versions of Windows and different language versions of Windows (see Table 8.3).

Table 8.3. MS Shell Dlg and MS Shell Dlg 2 Font Face Name Values Windows Version
Language Version
MS Shell Dlg
MS Shell Dlg 2

Windows XP Pro SP2
English
Microsoft Sans Serif
Tahoma

Windows XP Pro SP2
Arabic
Microsoft Sans Serif
Tahoma

Windows XP Pro SP2
French
Microsoft Sans Serif
Tahoma

Windows XP Pro SP2
German
Microsoft Sans Serif
Tahoma

Windows XP Pro SP2
Japanese
MS UI Gothic
Tahoma

Windows 2000 Professional
English
Microsoft Sans Serif
Tahoma

Windows NT 4 WorkStation
Japanese
(MS ) Japanese for MS PGothic
Not present

Windows 98 SE
English
Arial
Arial

Windows 98 SE
Japanese
Arial
Arial

The MS Shell Dlg font face name is intended to be used for compatibility with versions of Windows prior to Windows 2000. The MS Shell Dlg 2 font face name is intended to be used with Windows 2000 and above. However, you are free to use either font face name (where MS Shell Dlg 2 is preferred), as both names, thanks to font substitution and font mapping, work on all languages and all versions of Windows. The benefit of using one of these font face names in your application is that your application is abstracted from the problem of choosing a font directly, and this choice can be delayed until runtime. The disadvantage of using a font face name instead of a physical font name is that substituted fonts are not visible in the Properties Windows in Visual Studio and cannot be set in the Properties Window. Instead, they must be set in code:

public Form1()
{
Font = new Font("MS Shell Dlg 2", 12);
InitializeComponent();
}

The same comments as before about using a form base class apply equally here. An alternative to this approach is to use the StandardPropertiesResourceMan-ager in Chapter 12, "Custom Resource Managers," which can assign the same value to every property (e.g., Font) that is loaded as a resource.

 

From: http://tang6666.itpub.net/post/26630/299895