Home |
Obtaining a Pointer to PegPresentationManager Determining the Position of an Object Overriding the Message() Method Fonts |
FontsThe PegFont type contains information about each font used in your application. The PegScreen text output and text information routines require a pointer to a PegFont structure as a parameter. You do not have to create these structures manually, since the FontCapture utility program will automatically generate this data structure for you, along with the associated offset table and data table. By default, only two fonts called SystemFont and MenuFont are used. SystemFont is slightly larger than MenuFont, and is used for the title text in windows, and the strings in text boxes and string objects. MenuFont is used by menu bar and menu buttons, and by the PegPrompt and PegTextButton objects. You can easily change the font used by any text-related objects at run time by calling the SetFont() member function for that object after the object has been created. The two native fonts provided with RTPEG-32 have been hand-tuned to look nice at small point sizes. Larger fonts are usually very readable without any hand-tuning, and can be used directly as they are output from the Font Capture utility. Fonts used by RTPEG-32 use the standard 1252 ANSI code page (also called ISO 8859-1 or Latin 1) or Unicode encoding, while RTTarget-32's text mode display routines use the OEM 437 code page. RTPEG-32 switches RTTarget-32's input (keyboard) code page to 1252 at initialization using function RTSetCodepageTranslation. Applications using RTFiles-32 should also instruct RTFiles-32 to use code page 1252 by calling RTFSetCodePageANSI. The Unicode version of RTPEG-32 does not use code pages, but RTFSetCodePageANSI is still recommended as code page 1252 is largely identical with Unicode.
|