Text Font Home

During initialization ( lcInitialize ), LiteCAD builds a list of available fonts by scanning Windows system fonts (TrueType) and own fonts (LCF) in the directory specified by LC_PROP_G_DIRFONTS property.
In order to use a font to draw text in a window, you have to open desired font and select it.

These are the functions used to manage text fonts:

Function Meaning
lcFontAddRes
lcFontAddFile
lcFontAddBin
Adds a font to the list of available fonts, from various sources
lcFontGetFirst
lcFontGetNext
Used to sequentially retrieve objects from a list of available fonts

For Paint mode
lcPaint_FontOpenLC Opens LiteCAD font
lcPaint_FontOpenTT Opens TrueType font
lcPaint_FontClose Closes opened font
lcPaint_FontSelect Select opened font, which will be used to draw texts

A font object has the following properties:

Property Type Access Meaning
LC_PROP_FONT_FILENAME string R Font filename
LC_PROP_FONT_NAME string R Font name
LC_PROP_FONT_LCF bool R TRUE - LCF format, FALSE - TTF format
LC_PROP_FONT_TTF bool R TRUE - TTF format, FALSE - LCF format
LC_PROP_FONT_HEIGHT float R Base height
LC_PROP_FONT_FILLED bool R If TRUE then characters have closed outline, i.e. can be filled
LC_PROP_FONT_NCHARS int R Number of characters in the font