Text Style Home

A Text Style is a named, saved collection of settings that determine the appearance of text characters, for example, the settings include things like font, stretched, compressed, oblique, mirrored etc... The primary marker of any text style is LiteCAD font (LCF) or Windows TTF font that is assigned to that text style.
The LiteCAD package contains LCFont.exe program which can create LCF font file from AutoCAD SHX/SHP or Windows TTF font.
New Text entities are added to a drawing using the current text style.
When you create a new drawing, it already has one text style, by default, named "Standard".

These are the functions used to manage text styles in a drawing:

Function Meaning
lcDrwAddTextStyle Adds a new text style into a drawing
lcDrwDeleteObject Deletes an object from a drawing
lcDrwCountObjects Counts a number of objects, by type
lcDrwSortObjects Sorts objects by LC_PROP_TABLE_PRIORITY
lcDrwGetFirstObject
lcDrwGetNextObject
Used to sequentially retrieve all objects
lcDrwGetObjectByName Retrieves an object by its name
lcDrwGetObjectByID
lcDrwGetObjectByIDH
Retrieves object by its identifier

Text style object has the following properties:

Property Type Access Meaning
LC_PROP_TABLE_...    Base class properties
LC_PROP_TSTYLE_ID int
string
R Unique Identifier
Hexadecimal string (up to 16 characters)
LC_PROP_TSTYLE_NAME string RW Text style name
LC_PROP_TSTYLE_DESCR string RW Text style description
LC_PROP_TSTYLE_DRW handle R Handle to owner drawing
LC_PROP_TSTYLE_FONT string RW Font filename. Null or empty string means to load the font
LC_PROP_TSTYLE_HFONT handle R Handle to font
LC_PROP_TSTYLE_HEIGHT float RW Default height
LC_PROP_TSTYLE_WSCALE float RW Default width scale
LC_PROP_TSTYLE_OBLIQUE float RW Default oblique angle
LC_PROP_TSTYLE_ANGLE float RW Default rotation angle
LC_PROP_TSTYLE_ALIGN int RW Default alignment
LC_PROP_TSTYLE_UPDOWN bool RW "Upside down" flag
LC_PROP_TSTYLE_BACKWARD bool RW "Backward" flag
LC_PROP_TSTYLE_LINESPACE float RW Default linespace
LC_PROP_TSTYLE_CHARSPACE float RW Default charspace
LC_PROP_TSTYLE_STANDARD bool R "Standard" flag
LC_PROP_TSTYLE_SHAPES bool R "Shapes" flag
LC_PROP_TSTYLE_WINFONT bool RW if TRUE - Windows True Type font is used
LC_PROP_TSTYLE_SOLID bool RW TRUE - text chars are solid, FALSE - outline and filling are separate
LC_PROP_TSTYLE_CLOSED bool R TRUE - font chracters consist from closed shapes
LC_PROP_TSTYLE_HOLLOW bool R TRUE - font chracters are closed and not solid
LC_PROP_TSTYLE_BOLD bool RW "Bold" flag (for LC_ENT_TEXTWIN)
LC_PROP_TSTYLE_ITALIC bool RW "Italic" flag (for LC_ENT_TEXTWIN)
LC_PROP_TSTYLE_UNDERLINE bool RW "Underline" flag (for LC_ENT_TEXTWIN)
LC_PROP_TSTYLE_STRIKEOUT bool RW "Strikeout" flag (for LC_ENT_TEXTWIN)

See also

  Named objects,   Text,   Multiline text,   Arc text