Replacing Windows CE Default Fonts (Windows CE 5.0)
Windows CE uses a default set of fonts that exist in ROM. You can replace these fonts by modifying the Windows 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 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
Modify your Project.reg project registry file by adding the registry keys listed in the preceding table for the fonts you want to replace.
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. If you are adding a new default font to the Windows 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.
If you are adding a new default font to the Windows 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.
If you are setting a default font that is not part of the Windows 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.
Rebuild your image.
See Also
Replacing Fonts | Font Linking Registry Settings | Fonts Overview | Fonts OS Design Development
Send Feedback on this topic to the authors