You can change the appearance of your operating system (OS) by customizing fonts. Windows Embedded CE allows you to replace fonts, specify a directory from which the OS should load fonts, enable ClearType, enable anti-aliased fonts, enable linked fonts, change the font size for the Help system, enable end user-defined characters (EUDC), and enable line breaking for Asian fonts.
Windows Embedded CE loads system fonts from the /Windows directory on the device by default.
You can specify the directory from which Windows Embedded CE loads fonts by setting the HKEY_LOCAL_MACHINE/Software/Microsoft/FontPath registry key to the directory that you want to use. Do not include a trailing backslash when you specify the path for the directory.
The following example shows how to change the directory from which Windows Embedded CE loads system fonts to /Fonts.
[HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/FontPath] 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.
Windows Embedded CE provides a font linking capability so that you can link one or more TrueType fonts to another TrueType font. Font linking is typically used to enable Roman fonts to display non-Roman characters. Windows Embedded CE provides font linking in the MGTT component. To enable font linking, configure the FontLinkMethods entry under the HKEY_LOCAL_MACHINE/SYSTEM/GDI registry key. You can use the FontLinkMethods entry to enable cell height adjustment. When enabled, the rasterizer ignores internal leading when calculating the cell height of the linked font. Internal leading is commonly used for Roman fonts to allow accent marks to be placed within the interline spacing. Kanji fonts do not use internal leading. By not including internal leading in the realization of the linked font, the font is rendered from one to several point sizes smaller. The following example shows the FontLinkMethods entry.
The value for n can be 1, 2, or 3, as defined in the following table.
You can map linked fonts to base fonts by configuring the HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/FontLink/SystemLink registry key. The following example shows how to link Tahoma, the base font, to Trebuchet MS, the linked font, by providing the path to the linked font .ttf file and the linked font name.
When using font linking, you can define one or more Unicode characters that should be obtained from the linked font, even if they are present in the base font. You can define these skipped characters by using the HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/FontLink/SkipTable registry key. This registry key is read only when the OS boots. The following example shows that, even though there is a character in Tahoma at Unicode character 005c, the character in the linked font will be used instead.
For bold fonts, the graphics device interface (GDI) determines whether to simulate bold, using the base font only as a reference. If you use a bold font to write a string, and the base font is bold in the .ttf file, but the linked font is not, text in the linked font does not display as bold. |