TBLFontFace
Font face.
Definition
Unit: Blend2D
Properties
| Name | Description |
|---|---|
| Data | TBLFontData associated with this font face. |
| DesignMetrics | Design metrics of this TBLFontFace. |
| DiagFlags | Font face diagnostics flags. |
| FaceFlags | Font face flags. |
| FaceIndex | A zero-based index of this font face. |
| FaceInfo | Font face information. |
| FaceType | The font face type. |
| FamilyName | Family name of the font. |
| FullName | Full name of the font. |
| GlyphCount | The number of glyphs this font face provides. |
| HasBaselineYAt0 | Whether the font face's baseline equals 0. |
| HasCharToGlyphMapping | Whether the font face provides character to glyph mapping. |
| HasHorizontalKerning | Whether the font face has a legacy horizontal kerning feature ('kern' table with horizontal kerning data). |
| HasHorizontalMetrics | Whether the font face has horizontal glyph metrics (advances, side bearings). |
| HasLsbPointXAt0 | Whether the font face's left sidebearing point at X equals 0. |
| HasOpenTypeFeatures | Whether the font face has OpenType features (GDEF, GPOS, GSUB). |
| HasOpenTypeVariations | Whether the font face has OpenType Font Variations feature. |
| HasPanoseData | Whether the font face has panose classification. |
| HasTypographicMetrics | Whether the font face uses typographic metrics. |
| HasTypographicNames | Whether the font face uses typographic family and subfamily names. |
| HasUnicodeCoverage | Whether the font face has unicode coverage information. |
| HasVariationSequences | Whether the font face has unicode variation sequences feature. |
| HasVerticalKerning | Whether the font face has a legacy vertical kerning feature ('kern' table with vertical kerning data). |
| HasVerticalMetrics | Whether the font face has vertical glyph metrics (advances, side bearings). |
| IsEmpty | Tests whether the font face is empty, which is the same as not IsValid. |
| IsLastResortFont | Whether this is a last resort font. |
| IsSymbolFont | Whether this is a symbol font. |
| IsValid | Whether the font face is a valid instance. |
| OutlineType | The outline type. |
| Panose | Returns PANOSE classification of this TBLFontFace. |
| PostScriptName | PostScript name of the font. |
| Stretch | Font stretch (returns default stretch in case this is a variable font). |
| Style | Returns font style. |
| SubfamilyName | Subfamily name of the font. |
| UnicodeCoverage | Returns unicode coverage of this TBLFontFace. |
| UniqueId | A unique identifier describing this TBLFontFace. |
| UnitsPerEm | Units per em, which are part of font's design metrics. |
| Weight | Font weight (returns default weight in case this is a variable font). |
Constructors
| Name | Description |
|---|---|
| Assign | Copy constructor makes a weak copy of the underlying representation of the ASrc font face. |
| Finalize | Destroys the font face. |
| Initialize | Creates a default initialized font face. |
Operators
| Name | Description |
|---|---|
| Equal(TBLFontFace, TBLFontFace) | Returns True if two font faces are equal (have the same contents). |
| Equal(TBLFontFace, Pointer) | Used to compare against nil (null font face). |
| NotEqual(TBLFontFace, TBLFontFace) | Returns True if two font faces are not equal (do not have the same contents). |
| NotEqual(TBLFontFace, Pointer) | Used to compare against nil (null font face). |
Methods
| Name | Description |
|---|---|
| Equals | Tests whether this and AOther font faces are equal. |
| GetFeatureTags(TBLArray<TBLTag>) | Retrieves OpenType feature tags provided by this TBLFontFace. |
| GetFeatureTags | Retrieves OpenType feature tags provided by this TBLFontFace. |
| GetScriptTags(TBLArray<TBLTag>) | Retrieves OpenType script tags provided by this TBLFontFace. |
| GetScriptTags | Retrieves OpenType script tags provided by this TBLFontFace. |
| GetVariationTags(TBLArray<TBLTag>) | Retrieves OpenType variation tags provided by this TBLFontFace. |
| GetVariationTags | Retrieves OpenType variation tags provided by this TBLFontFace. |
| HasFaceFlag | Tests whether the font face has a given AFlag set. |
| HasFeatureTag | Tests whether the font face provides the given OpenType AFeatureTag. |
| HasScriptTag | Tests whether the font face provides the given OpenType AScriptTag. |
| HasVariationTag | Tests whether the font face provides the given OpenType AVariationTag. |
| MakeFromData | Creates a new TBLFontFace from TBLFontData at the given AFaceIndex. |
| MakeFromFile | Creates a new TBLFontFace from a file specified by AFilename. |
| Reset | |
| Swap |
Property Descriptions
Data
TBLFontData associated with this font face.
property Data: TBLFontData read GetData
Type: TBLFontData
DesignMetrics
Design metrics of this TBLFontFace.
property DesignMetrics: PBLFontDesignMetrics read GetDesignMetrics
Type: PBLFontDesignMetrics
DiagFlags
Font face diagnostics flags.
property DiagFlags: TBLFontFaceDiagFlags read GetDiagFlags
Type: TBLFontFaceDiagFlags
FaceFlags
Font face flags.
property FaceFlags: TBLFontFaceFlags read GetFaceFlags
Type: TBLFontFaceFlags
FaceIndex
A zero-based index of this font face.
property FaceIndex: Integer read GetFaceIndex
Type: Integer
Remarks
Face index does only make sense if this face is part of a TrueType or OpenType font collection. In that case the returned value would be the index of this face in that collection. If the face is not part of a collection then the returned value would always be zero.
FaceInfo
Font face information.
property FaceInfo: PBLFontFaceInfo read GetFaceInfo
Type: PBLFontFaceInfo
FaceType
The font face type.
property FaceType: TBLFontFaceType read GetFaceType
Type: TBLFontFaceType
FamilyName
Family name of the font.
property FamilyName: TBLString read GetFamilyName
Type: TBLString
FullName
Full name of the font.
property FullName: TBLString read GetFullName
Type: TBLString
GlyphCount
The number of glyphs this font face provides.
property GlyphCount: Integer read GetGlyphCount
Type: Integer
HasBaselineYAt0
Whether the font face's baseline equals 0.
property HasBaselineYAt0: Boolean read GetHasBaselineYAt0
Type: Boolean
HasCharToGlyphMapping
Whether the font face provides character to glyph mapping.
property HasCharToGlyphMapping: Boolean read GetHasCharToGlyphMapping
Type: Boolean
HasHorizontalKerning
Whether the font face has a legacy horizontal kerning feature ('kern' table with horizontal kerning data).
property HasHorizontalKerning: Boolean read GetHasHorizontalKerning
Type: Boolean
HasHorizontalMetrics
Whether the font face has horizontal glyph metrics (advances, side bearings).
property HasHorizontalMetrics: Boolean read GetHasHorizontalMetrics
Type: Boolean
HasLsbPointXAt0
Whether the font face's left sidebearing point at X equals 0.
property HasLsbPointXAt0: Boolean read GetHasLsbPointXAt0
Type: Boolean
HasOpenTypeFeatures
Whether the font face has OpenType features (GDEF, GPOS, GSUB).
property HasOpenTypeFeatures: Boolean read GetHasOpenTypeFeatures
Type: Boolean
HasOpenTypeVariations
Whether the font face has OpenType Font Variations feature.
property HasOpenTypeVariations: Boolean read GetHasOpenTypeVariations
Type: Boolean
HasPanoseData
Whether the font face has panose classification.
property HasPanoseData: Boolean read GetHasPanoseData
Type: Boolean
HasTypographicMetrics
Whether the font face uses typographic metrics.
property HasTypographicMetrics: Boolean read GetHasTypographicMetrics
Type: Boolean
HasTypographicNames
Whether the font face uses typographic family and subfamily names.
property HasTypographicNames: Boolean read GetHasTypographicNames
Type: Boolean
HasUnicodeCoverage
Whether the font face has unicode coverage information.
property HasUnicodeCoverage: Boolean read GetHasUnicodeCoverage
Type: Boolean
HasVariationSequences
Whether the font face has unicode variation sequences feature.
property HasVariationSequences: Boolean read GetHasVariationSequences
Type: Boolean
HasVerticalKerning
Whether the font face has a legacy vertical kerning feature ('kern' table with vertical kerning data).
property HasVerticalKerning: Boolean read GetHasVerticalKerning
Type: Boolean
HasVerticalMetrics
Whether the font face has vertical glyph metrics (advances, side bearings).
property HasVerticalMetrics: Boolean read GetHasVerticalMetrics
Type: Boolean
IsEmpty
Tests whether the font face is empty, which is the same as not IsValid.
property IsEmpty: Boolean read GetIsEmpty
Type: Boolean
IsLastResortFont
Whether this is a last resort font.
property IsLastResortFont: Boolean read GetIsLastResortFont
Type: Boolean
IsSymbolFont
Whether this is a symbol font.
property IsSymbolFont: Boolean read GetIsSymbolFont
Type: Boolean
IsValid
Whether the font face is a valid instance.
property IsValid: Boolean read GetIsValid
Type: Boolean
OutlineType
The outline type.
property OutlineType: TBLFontOutlineType read GetOutlineType
Type: TBLFontOutlineType
Panose
Returns PANOSE classification of this TBLFontFace.
property Panose: PBLFontPanose read GetPanose
Type: PBLFontPanose
PostScriptName
PostScript name of the font.
property PostScriptName: TBLString read GetPostScriptName
Type: TBLString
Stretch
Font stretch (returns default stretch in case this is a variable font).
property Stretch: TBLFontStretch read GetStretch
Type: TBLFontStretch
Style
Returns font style.
property Style: TBLFontStyle read GetStyle
Type: TBLFontStyle
SubfamilyName
Subfamily name of the font.
property SubfamilyName: TBLString read GetSubfamilyName
Type: TBLString
UnicodeCoverage
Returns unicode coverage of this TBLFontFace.
property UnicodeCoverage: PBLFontUnicodeCoverage read GetUnicodeCoverage
Type: PBLFontUnicodeCoverage
Remarks
The returned unicode-coverage is not calculated by Blend2D so in general the value doesn't have to be correct. Consider GetCharacterCoverage to get a coverage calculated by Blend2D at character granularity.
UniqueId
A unique identifier describing this TBLFontFace.
property UniqueId: TBLUniqueId read GetUniqueId
Type: TBLUniqueId
UnitsPerEm
Units per em, which are part of font's design metrics.
property UnitsPerEm: Integer read GetUnitsPerEm
Type: Integer
Weight
Font weight (returns default weight in case this is a variable font).
property Weight: TBLFontWeight read GetWeight
Type: TBLFontWeight
Constructor Descriptions
Assign
Copy constructor makes a weak copy of the underlying representation of the ASrc font face.
constructor Assign(var ADest: TBLFontFace; const ASrc: TBLFontFace); inline
Parameters
ADest: TBLFontFace
ASrc: TBLFontFace
Exceptions
EBlend2DError: Raised on failure.
Finalize
Destroys the font face.
destructor Finalize(var ADest: TBLFontFace)
Parameters
ADest: TBLFontFace
Exceptions
EBlend2DError: Raised on failure.
Initialize
Creates a default initialized font face.
constructor Initialize(out ADest: TBLFontFace)
Parameters
ADest: TBLFontFace
Exceptions
EBlend2DError: Raised on failure.
Operator Descriptions
Equal(TBLFontFace, TBLFontFace)
Returns True if two font faces are equal (have the same contents).
class operator Equal(const ALeft, ARight: TBLFontFace): Boolean; inline; static
Parameters
ALeft: TBLFontFace
ARight: TBLFontFace
Returns
Boolean
Equal(TBLFontFace, Pointer)
Used to compare against nil (null font face).
class operator Equal(const ALeft: TBLFontFace; const ARight: Pointer): Boolean; inline; static
Parameters
ALeft: TBLFontFace
ARight: Pointer
Returns
Boolean
NotEqual(TBLFontFace, TBLFontFace)
Returns True if two font faces are not equal (do not have the same contents).
class operator NotEqual(const ALeft, ARight: TBLFontFace): Boolean; inline; static
Parameters
ALeft: TBLFontFace
ARight: TBLFontFace
Returns
Boolean
NotEqual(TBLFontFace, Pointer)
Used to compare against nil (null font face).
class operator NotEqual(const ALeft: TBLFontFace; const ARight: Pointer): Boolean; inline; static
Parameters
ALeft: TBLFontFace
ARight: Pointer
Returns
Boolean
Method Descriptions
Equals(TBLFontFace)
Tests whether this and AOther font faces are equal.
function Equals(const AOther: TBLFontFace): Boolean; inline
Parameters
AOther: TBLFontFace
Returns
Boolean
GetFeatureTags(TBLArray<TBLTag>)
Retrieves OpenType feature tags provided by this TBLFontFace.
Each feature tag is represented by 4 characters encoded in TBLTag.
Feature tag registry: - Microsoft.
procedure GetFeatureTags(const AOut: TBLArray<TBLTag>); overload; inline
Parameters
AOut: TBLArray<TBLTag>
GetFeatureTags
Retrieves OpenType feature tags provided by this TBLFontFace.
Each feature tag is represented by 4 characters encoded in TBLTag.
Feature tag registry: - Microsoft.
function GetFeatureTags: TArray<TBLTag>; overload; inline
Returns
TArray<TBLTag>
GetScriptTags(TBLArray<TBLTag>)
Retrieves OpenType script tags provided by this TBLFontFace.
Each script tag is represented by 4 characters encoded in TBLTag.
procedure GetScriptTags(const AOut: TBLArray<TBLTag>); overload; inline
Exceptions
EBlend2DError: Raised on failure.
Parameters
AOut: TBLArray<TBLTag>
GetScriptTags
Retrieves OpenType script tags provided by this TBLFontFace.
Each script tag is represented by 4 characters encoded in TBLTag.
function GetScriptTags: TArray<TBLTag>; overload; inline
Exceptions
EBlend2DError: Raised on failure.
Returns
TArray<TBLTag>
GetVariationTags(TBLArray<TBLTag>)
Retrieves OpenType variation tags provided by this TBLFontFace.
Each variation tag is represented by 4 characters encoded in TBLTag.
Variation tag registry: - Microsoft.
procedure GetVariationTags(const AOut: TBLArray<TBLTag>); overload; inline
Parameters
AOut: TBLArray<TBLTag>
GetVariationTags
Retrieves OpenType variation tags provided by this TBLFontFace.
Each variation tag is represented by 4 characters encoded in TBLTag.
Variation tag registry: - Microsoft.
function GetVariationTags: TArray<TBLTag>; overload; inline
Returns
TArray<TBLTag>
HasFaceFlag(TBLFontFaceFlag)
Tests whether the font face has a given AFlag set.
function HasFaceFlag(const AFlag: TBLFontFaceFlag): Boolean; inline
Parameters
AFlag: TBLFontFaceFlag
Returns
Boolean
HasFeatureTag(TBLTag)
Tests whether the font face provides the given OpenType AFeatureTag.
function HasFeatureTag(const AFeatureTag: TBLTag): Boolean; inline
Parameters
AFeatureTag: TBLTag
Returns
Boolean
HasScriptTag(TBLTag)
Tests whether the font face provides the given OpenType AScriptTag.
function HasScriptTag(const AScriptTag: TBLTag): Boolean; inline
Parameters
AScriptTag: TBLTag
Returns
Boolean
HasVariationTag(TBLTag)
Tests whether the font face provides the given OpenType AVariationTag.
function HasVariationTag(const AVariationTag: TBLTag): Boolean; inline
Parameters
AVariationTag: TBLTag
Returns
Boolean
MakeFromData(TBLFontData, Integer)
Creates a new TBLFontFace from TBLFontData at the given AFaceIndex.
On success the existing TBLFontFace is completely replaced by a new one, on failure the existing TBLFontFace is kept as is.
procedure MakeFromData(const AFontData: TBLFontData; const AFaceIndex: Integer); inline
Exceptions
EBlend2DError: Raised on failure.
Parameters
AFontData: TBLFontData
AFaceIndex: Integer
MakeFromFile(String, TBLFileReadFlags)
Creates a new TBLFontFace from a file specified by AFilename.
This is a utility method that first creates a TBLFontData and then calls MakeFromData(FontData, 0). See TBLFontData.MakeFromFile for more details, especially the use of AReadFlags is important for system fonts.
procedure MakeFromFile(const AFilename: String; const AReadFlags: TBLFileReadFlags = []); inline
Exceptions
EBlend2DError: Raised on failure.
Parameters
AFilename: String
AReadFlags: TBLFileReadFlags = []
See Also
Remarks
This method offers a simplified creation of TBLFontFace directly from a file, but doesn't provide as much flexibility as MakeFromData as it allows to specify a AFaceIndex, which can be used to load multiple font faces from a TrueType/OpenType collection. The use of MakeFromData is recommended for any serious font handling.
Reset
procedure Reset; inline
Swap(TBLFontFace)
procedure Swap(var AOther: TBLFontFace); inline
Parameters
AOther: TBLFontFace