Layout

<< Click to Display Table of Contents >>

Navigation:  Font engine >

Layout

 THtLayout = record
 public
   Font: TOTFFont;
   FontSize, LetterSpacing: single;
   Glyphs: array of THtLayoutGlyph;
   Flags: byte;
   StylisticSet: TOTFStylisticFeatures;
   FeatureSet: TOpentypeFeatures;
   FontStyle: THtFontStyles;
   function Width: single;
   function Ascent: single;
   function Descent: single;
   function AsSVG: string;
   procedure AsPath(P: THtPath);
   property RTL: boolean read GetRTL write SetRTL;
   property Kerning: boolean read GetKerning write SetKerning;
   property Substitution: boolean read GetSubstitution write SetSubstitution;
   property Positioning: boolean read GetPositioning write SetPositioning;
 end;
 
 THtLayoutGlyph = record
   Symbol code
   CID: cardinal; 
   Glyph ID
   GID: word;
   Offset from default position
   DX, DY: Smallint;
   Width in font units
   Width: SmallInt;
 end;

 

Glyphs

 

Layout glyphs. After calling PrepareLayout glyph number can change and will not correspond to initial text length.

 

Flags

 

Font flags. Use properties to get/set flags.

 

StylisticSet

 

Set of stylistic features (ss01..ss20) that should be processed during PrepareLayout

 

FeatureSet

 

Set of OpenType features that should be processed during PrepareLayout

 

FontStyle

 

Bold, Italic, Underline, Strikeout

 

Width

 

Total width of layout

 

Ascent

 

Ascent value

 

Descent

 

Descent value

 

AsSVG

 

Convert layout to SVG string

 

AsPath

 

Convert layout to SVG path

 

RTL

 

Layout contains right-to-left text

 

Kerning

 

Process kerning when prepare layout (Kern table)

 

Substitutions

 

Process glyph substitutions when prepare layout (ligatures, etc.GSUB table)

 

Positioning

 

Adjust glyphs positions when prepare layout (GPOS table)