LiteCAD font (LCF) file format Home

Font header (100 bytes):

Size (bytes) Data type Description
8 Text Font signature, string "VCFONTnn", where nn - number of font file format (current is 02)
32 Text Font name, zero-terminated string
16 Byte Reserved
2 Integer Number of characters in the font
2 Integer Base height
4 Integer Flags:   1 - filled characters, all polylines are closed
4 Integer Offset (in bytes) from the begining of file to the data of first character
1 Integer 0 - can be spline segments between points;   1 - only linear segments
31 Byte Reserved

Index table, size = <Number of font characters> * <6 bytes>

Size (bytes) Data type Description
2 Integer Code of character
4 Integer Offset (in bytes) from start of first character data

Character data

Size (bytes) Data type Description
2 Integer Character width (by right extent of its polylines)
2 Integer Character width with blank space
2 Integer Height of character
1 Integer Number of polylines in the character (nPlines)
1 Integer Length of the character name (LenName)
LenName String Character name
nPlines Byte[] Each byte in the array is a number of points in a polyline
Varies Point[] Array of points of all polylines

Point of a polyline

If there are linear segments between points:

Size (bytes) Data type Description
2 Integer X value
2 Integer Y value

If there are spline segments between points:

Size (bytes) Data type Description
2 Integer X value
2 Integer Y value
1 Integer 0 - point is out of curve;   1 - point is on curve