
Home |
|
Using Fonts
|

Index |
|
The KwikPeg Configuration Builder makes it easy to specify the fonts
to be used for different categories of text objects. The following
screen shot illustrates the font assignments which KwikPeg uses
by default unless altered by you.

KwikPeg maintains an array of default fonts which it uses to
assign fonts to text bearing objects when they are created.
Each font in the array is referenced by its index which is called a font ID.
The font IDs correlate to the
font assignments made in your KwikPeg
Libary Parameter File.
Each font ID is given a mnemonic of the form PEG_xxxx_FONT
for use by KwikPeg.
Rarely will you have to use these mnemonics unless you want to use
the font of a specific category
(see GetDefaultFont())
or dynamically change the default font assignments
(see SetDefaultFont()).
The following font IDs are defined and used as follows:
PEG_FONT1_FONT |
Primary Font1 to which other font categories may be aliased.
|
PEG_FONT2_FONT |
Primary Font2 to which other font categories may be aliased.
|
PEG_TITLE_FONT |
Titles on title bars (see PegTitle)
|
PEG_MENU_FONT |
Text on menu bars and menus (see PegMenuBar,
PegMenuButton and PegMenu)
|
PEG_TBUTTON_FONT |
Text on buttons (see PegTextButton)
|
PEG_RBUTTON_FONT |
Text next to a radio button (see PegRadioButton)
|
PEG_CHECKBOX_FONT |
Text next to a check box (see PegCheckBox)
|
PEG_PROMPT_FONT |
Decorative text and prompts (see PegPrompt)
|
PEG_STRING_FONT |
Editable text string (see PegString)
|
PEG_TEXTBOX_FONT |
Multiline text box (see PegEditBox and PegTextBox)
|
PEG_GROUP_FONT |
Text on a group container (see PegGroup)
|
PEG_ICON_FONT |
Text used on face of an icon (see PegIcon)
|
PEG_CELL_FONT |
Text in a spreadsheet cell (see PegSpreadSheet)
|
PEG_HEADER_FONT |
Text in a spreadsheet row or column heading or in a column
footer (see PegSpreadSheet)
|
PEG_TAB_FONT |
Text on notebook tabs (see PegNotebook)
|
PEG_MESGWIN_FONT |
Text in message windows (see PegMessageWindow)
|
PEG_TREEVIEW_FONT |
Text on nodes of a tree structured list (see PegTreeView and
PegTreeNode)
|
PEG_PROGBAR_FONT |
Text on a progress bar (see PegProgressBar)
|
The PegFont structure contains format and data address
information for KwikPeg compatible fonts.
The PegFont structure is defined as:
struct PegFont
{
UCHAR uType; // Bitmapped, vector, other
UCHAR uAscent; // Height above base (pixels)
UCHAR uDescent; // Height below base (pixels)
UCHAR uHeight; // Vertical dimension (pixels)
WORD wBytesPerLine; // Bytes in each scan line
// in data array
WORD wFirstChar; // First available character
WORD wLastChar; // Last available character
WORD *pOffsets; // Pointer to bit offset table
// (for variable width font)
UCHAR *pNext; // Pointer to next Unicode font page
// NULL if none
UCHAR *pData; // Pointer to bitmap data array
};



