Поделиться через


MUI Font Linking (Windows Embedded CE 6.0)

1/6/2010

Fonts affect the way that the user interface is displayed on a Multilingual User Interface (MUI)–enabled run–time image. Therefore, working with languages that may use different fonts requires special considerations. Font linking solves nearly all of the potential problems that may arise. Other issues can be handled with appropriate registry settings.

To enable the UI to appear correctly for all of the supported languages, you must include the appropriate fonts in the run–time image.

For more information about including fonts in your run–time image, see Fonts OS Design Development.

In an MUI–enabled run–time image, font linking checks for the current user UI language registry value, and then associates it with code page data in the font file to ensure the correct font is linked for the target.

When the run–time image boots, the Graphics, Windowing, and Events Subsystem (GWES) checks if a value for the UI language has been set for the HKEY_CURRENT_USER\MUI\CurLang registry key. If a value has been set for this key, GWES will check the LCID that is specified under this key against a list that includes all the locales that are supported in Windows Embedded CE and match the locale with the associated code page. GWES will use the data in the font code page to determine which font should be considered as the default link font.

When a user changes the default UI language, thereby initiating a call to SetUserDefaultUILanguage, and then resets the device, GWES will read the new LCID value and check for the font that has the matching code page to use as a default link font.

Font linking data is stored in the registry under the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\FontLink\SystemLink registry key.

If your run–time image includes more than one East Asian locale, you must modify the values under the SystemLink registry key in common.reg to include the font files for all of your targeted locales. You must list all of the font files by using a semicolon separator as shown in the following example:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\FontLink\SystemLink]
   "Arial"="\\Windows\\simsun.ttc,NSimSun;\\Windows\\msgothic.ttc,MS UI Gothic"
  "Times New Roman"="\\Windows\\simsun.ttc,NSimSun;\\Windows\\msgothic.ttc,MS UI Gothic"
  "Tahoma"="\\Windows\\simsun.ttc,NSimSun;\\Windows\\msgothic.ttc,MS UI Gothic"
  "Courier New"="\\Windows\\simsun.ttc,NSimSun;\\Windows\\msgothic.ttc,MS UI Gothic"
  "Symbol"="\\Windows\\simsun.ttc,NSimSun;\\Windows\\msgothic.ttc,‚c‚e"Á'¾ƒSƒVƒbƒN'Ì"

Note

To avoid conversion problems, Microsoft recommends that you do not use localized font names when you list East Asian font files in common.reg.

Note

When adding the font names to common.reg, you must list each font with its English name.

After you have listed the fonts for all of your East Asian locales under the default SystemLink key, you must delete any other instances of the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\FontLink\SystemLink registry key that may be present in common.reg.

MUI font linking also supports the concept of skipped characters. These allow you to define one or more Unicode characters that should be obtained from the linked font, even if they are present in the base font. Data for skipped characters is stored under the HKEY_LOCAL_MACHINE\Software\Microsoft\FontLink\SkipTable registry key.

The default skip table requires no locale identifier to be set. Therefore, the content of the default skip table may be shared between different locales. For locales that use a skip table with different characters than the ones in the default skip table, the skip table must be preceeded by the LCID in the registry.

The following example shows a skip table that may be shared among Japanese, Simplified Chinese, and Traditional Chinese. Because the skip table used for Korean differs from the default skip table, the Korean LCID (0412) has been added after the default skip table, and separated with a semi–colon. The content of the Korean skip table has been added after the LCID.

Tahoma"="005c,00a5,007e,0391-03c9,2026,2116,221a,25a0-25ff;:005c"

As with the SystemLink registry key, after you have specified the skip table under the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\FontLink\SkipTable registry key, you must delete any other instances of the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\FontLink\SkipTable registry key that are present in common.reg.

After you have specified the font linking and skip table information, you must save common.reg and rebuild your run–time image.

For more information about font linking or skip tables, see Enabling Linked Fonts.

See Also

Concepts

Multilingual User Interface (MUI) OS Design Development

Other Resources

Working with Fonts in the MUI
Fonts