4 Character Sets

The TCEF_Character_Set class manages a set of characters for use on screen or terminal components. Up to 256 glyphs can be defined in a character set, with the first having an index of 0. If asked to render a glyph with an index greater than 127 and the correspoding glyph does not exist, the object will attempt to render the glyph with Index - 128. In the case of an index less than 128, nothing happens if the requested glyph doesn't exist. The maximum glyph width supported by this component is 32 pixels. The maximum height is 64 pixels. The component doesn't support differing glyph heights and the height of the glyphs in the character set is defined by the last defined glyph in the set. Attempts to load a character set file with differing glyph heights will result in unpredictable behavior. The glyphs in the set are assumed to contain blank scan lines for inter-line spacing.


This class consists of the following methods.



boolean Get_Invert()


Returns True if the object is set to render characters in inverted video.



void Set_Invert( boolean Value )


If Value is True, the object is set to render characters in inverted video.



void Clear()


Deletes all glyphs in the character set.



boolean Draw( Handle, X, Y, Index : integer )


Renders character glyph Index on the window specified by Handle, at position X, Y. This function is deprecated. Use DrawEx.



boolean DrawEx( Handle, X, Y, Index, Flags : integer )


Renders character glyph Index on the window specified by Handle, at position X, Y. Flags indicates the drawing options. Currently, Flags can be 0 for normal, or 1 to merge the glyph with the existing destination.



boolean Has_Glyph( integer Index )


Returns True if a glyph with the specified index is defined in the character set.



integer Height()


Returns the height of the glyphs in the set, in pixels (or scan lines).



void Initialize()


Initializes the object.



void Load( string Name ) ;


Loads a character set from the file specified in Name. If the CEF character file (*.c) is not found, it is assumed to be an Operating System font name.



void Terminate()


Destructs the object.



integer Width( integer Index )


Returns the width of the specified glyph, in pixels.



4.1 CEF Character files