LMD-Tools Font Image List Guide


TLMDFontItem


type

  TLMDFontItem = class(TCollectionItem);

 

Font collection items type; represents a single in-memory private font. Items can be created using font collection component editor at design-time. At run-time FontCollection.Items.Add method can be used to create new font items.

 

procedure Load(const AFileName: string);

procedure Load(AStream: TStream; AFormat: TLMDFontFormat);

Loads custom font data from the font file or a stream. In case of loading from a AStream stream, the format should be specified explicitly.

 

Set AFormat parameter to ffFont is the stream content represents the data in *.ttf or *.otf file format. Set the format to ffZip, if the custom font produced by the IcoMoon or Fontello web applications in *.zip format is considered.

 

In case of loading a font from the file the format is determined automatically by the file extension.

procedure Clear;

Unloads the font and clears the contained font data.

property FontName: string;

Read-only property which specifies the font name decoded from the loaded font data.

property Copyrights: string;

Read-only property which specifies the copyrights metadata string decoded from the loaded font data.

property Size: Int64;

Read-only property which specifies the size of the contained font data in bytes.

property SizeInDfm: Int64;

Read-only property which specifies the size that will be required to store font data in DFM file. The value of this property can be different from the Size property if the Compress property is set to True.

property Compress: Boolean;

Allow to specify whether the font data should be compressed (zipped) whem storing in DFM file. Set the property to True to save minimize stored data size.

property IsEmpty: Boolean;

Read-only property which specifies whether the item contains a valid font data.

property Codepoints: TStrings;

String list property which specifies the list of known code-points of loaded custom font. For ffZip font files, produces by IcoMoon and Fontello web application this list is filled automatically by extracting the code-points from the contained JSON description file.

 

Otherwise it can be specified manually. Each line should represent a code-point name and a symbol hexadecimal code separated by a space character. For example:
 
message E90C

information E907

datetime E90D