次の方法で共有


Replacing Windows Embedded CE Default Fonts (Windows Embedded CE 6.0)

1/6/2010

Windows Embedded CE uses a default set of fonts that exist in ROM. You can replace these fonts by modifying the Windows Embedded CE registry and the Project.bib file. The replacement font must exist in the Windows directory on the target device.

The following table shows the locations of the fonts that you can replace through the Windows Embedded CE registry.

Font location Registry key

System

HKEY_LOCAL_MACHINE\SYSTEM\GDI\SysFnt

Menu bar

HKEY_LOCAL_MACHINE\SYSTEM\GWE\Menu\BarFnt

Pop-up menu

HKEY_LOCAL_MACHINE\SYSTEM\GWE\Menu\PopFnt

Out of Memory window

HKEY_LOCAL_MACHINE\SYSTEM\GWE\OOMFnt

To change a font

  1. Modify your Project.reg project registry file by adding the registry keys listed in the preceding table for the fonts you want to replace.

  2. Under each registry key, add the following variables and values:

    **"Nm"=**font-name

    **"Ht"=DWORD:**height

    **"It"=DWORD:**italics-flag

    **"Wt"=DWORD:**weight

    **"CS"=DWORD:**character-set

    The following table describes each of these variables.

    Variable Description

    font-name

    Font name, not including the extension. For example, to load the Arial font, Arial.ttf, use the following value for the font-name variable:

    "Nm"=Arial

    height

    Font height, in pixels.

    italics-flag

    Set to 1 for italics; 0 for no italics.

    weight

    Font weight, which can be one of the FW_* values.

    character-set

    Defines the character set, which can be one of the *_CHARSET values.

  3. If you are adding a new default font to the Windows Embedded CE font set, add the font(s) you want to use from the Catalog. The OS will use your new default font automatically but keep the original system default font installed, depending on the locale setting.

  4. If you are adding a new default font to the Windows Embedded CE font set and want to remove all the unnecessary fonts that are installed with it, set the REPLACE_SYSGEN_DEFAULT_FONT and add the fonts you want to use from the Catalog.

  5. If you are setting a default font that is not part of the Windows Embedded CE font set, for example, a font obtained from a third-party, a font you have developed yourself, etc., add the font to the Project.bib file. If you do not want to remove all other fonts, just add your default font to the Catalog and it will be used automatically, as described in step 3. If you do want to remove unnecessary fonts, set REPLACE_SYSGEN_DEFAULT_FONT as described in step 4.

  6. Rebuild your image.

See Also

Reference

Replacing Fonts

Concepts

Fonts Linking Registry Settings
Fonts Overview

Other Resources

Fonts OS Design Development