<< Click to Display Table of Contents >> Navigation: Font engine > OpenType font format |
TOTFFont = class
public
OffsetTable: TOTFOffsetTable;
CMAPTable: TOTFCMAPTable;
FontHeader: TOTFFontHeaderTable;
HHeader: TOTFHHeaderTable;
MaxProfile: TOTFMaxProfileTable;
Names: TOTFNameTable;
HMetrics: TOTFHMetricsTable;
OS2: TOTFOS2Table;
PostScript: TOTFPostScriptTable;
LocaTable: TOTFLocaTable;
GlyphTable: TOTFGlyphTable;
GPOS: TOTFGPOSTable;
GSUB: TOTFGSUBTable;
Kern: TOTFKerningTable;
CFFData: TBytes;
TableRecs: array of TOTFTableRec;
Name: string;
class function NormalizeFont(const FontData: TBytes; AFont: THtBaseFont): TBytes;
class function NormalizeHeader(const FontData: TBytes): TBytes;
class function WofftoOTF(const FontData: TBytes; const FontName: string = ''): TBytes;
constructor Create;
destructor Destroy; override;
procedure LoadfromStream(ST: TStream);
procedure LoadfromFile(const AFileName: string);
procedure DeleteTablebyType(Tag: cardinal);
procedure Assign(ASource: TCFFFont);
procedure SavetoStream(ST: TStream);
procedure SavetoWOFFStream(ST: TStream);
procedure LoadfromWOFFStream(ST: TStream);
procedure LoadfromWOFFFile(const AFileName: string);
procedure SavetoFile(const AFileName: string);
procedure SavetoWOFFFile(const AFileName: string);
function AsFontFace(const AFamilyName: string): string;
procedure SavetoSVG(const FileName: string);
function GetGlyphName(GID: integer): string;
function GetGlyphs(const s: hstring): TWordDynArray;
function CreateLayout(const Text: hstring; const FontSize: single; out Layout: THtLayout): boolean;
procedure PrepareLayout(var Layout: THtLayout);
procedure GetGlyphPlacement(var Layout: THtLayout);
function MeasureString(const Text: hstring; const FontSize: single): single;
function Ascent(const FontSize: single): single;
function Descent(const FontSize: single): single;
function Underline(const FontSize: single): single;
property Tables[Index: integer]: TOTFTable read GetTable;
property TableCount: integer read GetTableCount;
property IsTTF: boolean read GetIsTTF write SetIsTTF;
///<summary> Returns font as set of SVG images</summary>
property AsSVG: string read GetSVG; end;
Font tables (may be nil).
Font data when font is in CFF format
Font table records
Font name
Add necessary tables and encodings to font.
Calculate font header fields
Convert WOFF font to OTF font.
Load OTF from stream
Load OTF from file
Delete font table by table type
Load from CFF font.
Save to OTF stream
Save to WOFF stream
Load from WOFF stream
Load from WOFF file
Save to OTF file
Save to WOFF file
Get base64 encoded string for embedding into HTML
Save all glyphs as SVG
Postscript glyph name
Get glyph IDs for string
Create new layout object, set glyph IDs and set properties to default values
Process glyph substitutions, position adjustment and kerning (GPOS, GSUB and KERN tables)
Set glyph widths
Measure string width
Font ascent value
Font descent valie
Underline position (from top)
Font tables by index
Font table count
Font oulines type: TTF or CFF
Get font glyphs as SVG string.