Product Home Class IndexDownload

CK_Font

Fonts are used as properties of the CK_Label and CK_LineEdit interface components. A label's font can be set by calling the setProp() member function and passing a pointer to a CK_Font object.

The CK_Font class is the base class for three types of Chilkat font classes: CK_WindowsFont, CK_BitmapFont, and CK_FixedBitmapFont. A CK_WindowsFont object is created by passing a handle to a Windows font (an HFONT). This handle is obtained by calling the Windows API functions CreateFont or CreateFontIndirect. The CK_BitmapFont and CK_FixedBitmapFont classes provide two ways of creating custom bitmapped fonts. Each type of font is created from a bitmap containing the character set formatted in a specific way.

The Chilkat font classes are intended to make it easy for game developers to integrate custom bitmapped fonts into their games. It allows for regular Windows fonts to be used interchangeably with bitmapped fonts. Programs can initially display Windows fonts, and then easily replace them later when the artwork for custom fonts are completed.