On Time RTOS-32 Documentation
Welcome
RTTarget-32
RTKernel-32
RTFiles-32
RTIP-32
RTPEG-32
RTPEG-32 Programming Manual
Introduction
Overview
Programming with RTPEG-32
Screen Drivers
Demo Programs
Utility Programs
Window Builder
Image Convert
Font Capture
Configuring Character Range
Font Range Configuration
Applying Custom Character Filters
Defining Unicode Strings
Using Custom Fonts
Changing Font Defaults
Make String Table
RTPEG-32 Reference Manual
RTUSB-32
|
Using Custom Fonts
Using fonts generated with FontCapture is very simple. Every RTPEG-32 object that supports text output has a member function called SetFont(PegFont *). Therefore, after constructing an RTPEG-32 object that should use the new font, you simply call that object's SetFont function, passing a pointer to your new font. For example, assume that you told PegFontCapture to generate a new font called "MyNewFont", by typing this in the font name field of PegFontCapture. In this case, the following code fragment illustrates the process of altering the font used by a RTPEG-32 object:
extern PegFont MyNewFont;
PegTextButton * pButton =
new PegTextButton(10, 10, 100, MESG1, "NewFont");
PButton->SetFont(&MyNewFont);
Likewise, if you have overloaded a Draw() function for a window or other object, and you are drawing text on the screen, you can simply pass the pointer to your new font to any of the PegScreen text information or output functions.
Font Capture
Defining Unicode Strings
Changing Font Defaults
|