Home |
Composite Fonts and Reduced Fonts |
Composite Fonts and Reduced FontsIf the project is configured to support multiple languages and Unicode, the operation of adding and defining a font becomes more complex. This is due to several factors, primarily the large number of characters (> 30,000) which may be required for the support of multiple languages. The Font Name field assumes the name of the source font for standard (i.e. non-Composite, non-Reduced) fonts. For Composite or Reduced fonts, Window Builder will produce a completely new PegFont from the input font data when the String Table file is generated. In this case, you can assign any name to the new font by typing into the Font Name field. Composite Fonts are fonts collections, produced and managed by Window Builder, containing multiple sub-fonts produced by the FontCapture program. Composite fonts are needed to overcome limitations in the character set or alphabet included in most TrueType or BDF (Adobe PostScript Glyph Bitmap Distribution Format) font files. In many cases you will find it is impossible to obtain one single TrueType or BDF font that contains all of the characters required by your application program. For example, one TrueType font may contain the Latin and Cyrillic characters, while another contains Kanji and Hangul. It is very rare to find a single font that contains characters for many different alphabets. In order to avoid re-assigning the font associated with every PEG object when a language change is made, it is desirable to have a single font (or multiple fonts of different sizes, each containing the same character set) that contains all of the characters used by your application program. This is the reason for Composite fonts. You can combine any number of sub-fonts into one SuperFont potentially containing all the characters from every sub-font. The true power of Composite Fonts is realized when combined with the Reduce Font option. This option instructs Window Builder to produce a new PegFont wherein only those characters actually used by your application strings are included in the new PegFont. The information about which characters to include is obtained by examining all strings found in the project String Table (described below). By using the Reduce Font option, you can save a tremendous amount of ROM storage for your fonts for languages with very large alphabets, such as Asian languages. If you select the Composite Font option, you can then select the Component Fonts button to edit a table which defines each sub-font that will be included in the composite font. For each sub-font that you add to your composite font, the range of characters used from the sub-font will default to the full range of characters contained in the sub-font. Since it is possible that several sub-fonts may contain overlapping characters, you may need to edit the First Char/Last Char ranges displayed in this table so that each sub-font provides a non-overlapping range of characters to the final composite font. When you have completed defining the sub-fonts that will make up your composite font, you simply close this table by pressing the Done button, and after naming your composite font click the OK button on the Font properties dialog. You can return and re-edit your Composite font settings at any time by right-clicking on the font name in the Font tree display. Note, however, that while you can change the component font list for a Composite font, you cannot change a previously added non-Composite font into a Composite font, nor can you change a Composite font into a normal font. Instead, you must delete the font from your project and newly add the font using the desired settings. For Unicode enabled systems using Reduced fonts, the Project | Update | Strings command does far more than simply write out all strings as C++ string arrays. For Unicode systems, Window Builder performs the following operations when the Project | Update | Strings command is issued:
|