TBLFontManager
Font manager.
Definition
Unit: Blend2D
Properties
Name | Description |
---|---|
FaceCount | The number of TBLFontFace instances the font manager holds. |
FamilyCount | The number of unique font families the font manager holds. |
IsValid | Whether the font manager is a valid TBLFontManager and not a built-in default instance. |
Constructors
Name | Description |
---|---|
Assign | Copy constructor makes a weak copy of the underlying representation of the ASrc font manager. |
Finalize | Destroys the font manager. |
Initialize | Creates a default initialized font manager. |
Operators
Name | Description |
---|---|
Equal(TBLFontManager, TBLFontManager) | Returns True if two font managers are equal (have the same contents). |
Equal(TBLFontManager, Pointer) | Used to compare against nil (null font manager). |
NotEqual(TBLFontManager, TBLFontManager) | Returns True if two font managers are not equal (do not have the same contents). |
NotEqual(TBLFontManager, Pointer) | Used to compare against nil (null font manager). |
Methods
Name | Description |
---|---|
AddFace | Adds a font AFace to the font manager. |
Equals | Tests whether this and AOther font managers are equal. |
HasFace | Tests whether the font manager contains the given font AFace . |
Make | Makes a valid TBLFontManager instance. |
QueryFace(TBLStringView, TBLFontQueryProperties) | Queries a font face by family AName and returns the result. |
QueryFace(String, TBLFontQueryProperties) | Queries a font face by family AName and returns the result. |
QueryFace(TBLStringView) | Queries a font face by family AName and returns the result. |
QueryFace(String) | Queries a font face by family AName and returns the result. |
QueryFacesByFamilyName(TBLStringView, TBLArray<TBLFontFace>) | Queries all font faces by family AName and stores the result to AOut . |
QueryFacesByFamilyName(TBLStringView) | Queries all font faces by family AName . |
QueryFacesByFamilyName(String, TBLArray<TBLFontFace>) | Queries all font faces by family AName and stores the result to AOut . |
QueryFacesByFamilyName(String) | Queries all font faces by family AName . |
Reset | Resets the font manager to a default constructed state. |
Swap | Swaps the underlying representation of this font manager with the AOther font manager. |
Property Descriptions
FaceCount
The number of TBLFontFace
instances the font manager holds.
property FaceCount: NativeInt read GetFaceCount
Type: NativeInt
See Also
FamilyCount
The number of unique font families the font manager holds.
property FamilyCount: NativeInt read GetFamilyCount
Type: NativeInt
IsValid
Whether the font manager is a valid TBLFontManager
and not a built-in default instance.
property IsValid: Boolean read GetIsValid
Type: Boolean
Constructor Descriptions
Assign
Copy constructor makes a weak copy of the underlying representation of the ASrc
font manager.
constructor Assign(var ADest: TBLFontManager; const ASrc: TBLFontManager); inline
Parameters
ADest
: TBLFontManager
ASrc
: TBLFontManager
Exceptions
EBlend2DError
: Raised on failure.
Finalize
Destroys the font manager.
destructor Finalize(var ADest: TBLFontManager)
Parameters
ADest
: TBLFontManager
Exceptions
EBlend2DError
: Raised on failure.
Initialize
Creates a default initialized font manager.
constructor Initialize(out ADest: TBLFontManager)
Parameters
ADest
: TBLFontManager
Exceptions
EBlend2DError
: Raised on failure.
Operator Descriptions
Equal(TBLFontManager, TBLFontManager)
Returns True if two font managers are equal (have the same contents).
class operator Equal(const ALeft, ARight: TBLFontManager): Boolean; inline; static
Parameters
ALeft
: TBLFontManager
ARight
: TBLFontManager
Returns
Boolean
Equal(TBLFontManager, Pointer)
Used to compare against nil
(null font manager).
class operator Equal(const ALeft: TBLFontManager; const ARight: Pointer): Boolean; inline; static
Parameters
ALeft
: TBLFontManager
ARight
: Pointer
Returns
Boolean
NotEqual(TBLFontManager, TBLFontManager)
Returns True if two font managers are not equal (do not have the same contents).
class operator NotEqual(const ALeft, ARight: TBLFontManager): Boolean; inline; static
Parameters
ALeft
: TBLFontManager
ARight
: TBLFontManager
Returns
Boolean
NotEqual(TBLFontManager, Pointer)
Used to compare against nil
(null font manager).
class operator NotEqual(const ALeft: TBLFontManager; const ARight: Pointer): Boolean; inline; static
Parameters
ALeft
: TBLFontManager
ARight
: Pointer
Returns
Boolean
Method Descriptions
AddFace(TBLFontFace)
Adds a font AFace
to the font manager.
procedure AddFace(const AFace: TBLFontFace); inline
Exceptions
EBlend2DError
: Raised on failure. For example if the font AFace
is invalid.
Parameters
AFace
: TBLFontFace
Equals(TBLFontManager)
Tests whether this and AOther
font managers are equal.
function Equals(const AOther: TBLFontManager): Boolean; inline
Parameters
AOther
: TBLFontManager
Returns
Boolean
HasFace(TBLFontFace)
Tests whether the font manager contains the given font AFace
.
function HasFace(const AFace: TBLFontFace): Boolean; inline
Parameters
AFace
: TBLFontFace
Returns
Boolean
Make
Makes a valid TBLFontManager
instance.
procedure Make; inline
Exceptions
EBlend2DError
: Raised on failure.
QueryFace(TBLStringView, TBLFontQueryProperties)
Queries a font face by family AName
and returns the result.
An AProperties
parameter contains query properties that the query engine will consider when doing the match. The best candidate will be selected based on the following rules:
- Style has the highest priority.
- Weight has the lowest priority.
function QueryFace(const AName: TBLStringView; const AProperties: TBLFontQueryProperties): TBLFontFace; overload; inline
Exceptions
EBlend2DError
: Raised on failure.
Parameters
AName
: TBLStringView
AProperties
: TBLFontQueryProperties
Returns
QueryFace(String, TBLFontQueryProperties)
Queries a font face by family AName
and returns the result.
An AProperties
parameter contains query properties that the query engine will consider when doing the match. The best candidate will be selected based on the following rules:
- Style has the highest priority.
- Weight has the lowest priority.
function QueryFace(const AName: String; const AProperties: TBLFontQueryProperties): TBLFontFace; overload; inline
Exceptions
EBlend2DError
: Raised on failure.
Parameters
AName
: String
AProperties
: TBLFontQueryProperties
Returns
QueryFace(TBLStringView)
Queries a font face by family AName
and returns the result.
function QueryFace(const AName: TBLStringView): TBLFontFace; overload; inline
Exceptions
EBlend2DError
: Raised on failure.
Parameters
AName
: TBLStringView
Returns
QueryFace(String)
Queries a font face by family AName
and returns the result.
function QueryFace(const AName: String): TBLFontFace; overload; inline
Exceptions
EBlend2DError
: Raised on failure.
Parameters
AName
: String
Returns
QueryFacesByFamilyName(TBLStringView, TBLArray<TBLFontFace>)
Queries all font faces by family AName
and stores the result to AOut
.
procedure QueryFacesByFamilyName(const AName: TBLStringView; const AOut: TBLArray<TBLFontFace>); overload; inline
Exceptions
EBlend2DError
: Raised on failure.
Parameters
AName
: TBLStringView
AOut
: TBLArray<TBLFontFace>
QueryFacesByFamilyName(TBLStringView)
Queries all font faces by family AName
.
function QueryFacesByFamilyName(const AName: TBLStringView): TArray<TBLFontFace>; overload; inline
Exceptions
EBlend2DError
: Raised on failure.
Parameters
AName
: TBLStringView
Returns
TArray<TBLFontFace>
QueryFacesByFamilyName(String, TBLArray<TBLFontFace>)
Queries all font faces by family AName
and stores the result to AOut
.
procedure QueryFacesByFamilyName(const AName: String; const AOut: TBLArray<TBLFontFace>); overload; inline
Exceptions
EBlend2DError
: Raised on failure.
Parameters
AName
: String
AOut
: TBLArray<TBLFontFace>
QueryFacesByFamilyName(String)
Queries all font faces by family AName
.
function QueryFacesByFamilyName(const AName: String): TArray<TBLFontFace>; overload; inline
Exceptions
EBlend2DError
: Raised on failure.
Parameters
AName
: String
Returns
TArray<TBLFontFace>
Reset
Resets the font manager to a default constructed state.
procedure Reset; inline
Swap(TBLFontManager)
Swaps the underlying representation of this font manager with the AOther
font manager.
procedure Swap(var AOther: TBLFontManager); inline
Parameters
AOther
: TBLFontManager