TBLFontFeatureSettings
Font feature settings.
Definition
Unit: Blend2D
Properties
Name | Description |
---|---|
Capacity | The container capacity. |
IsEmpty | Whether the container is empty, which means that no tag/value pairs are stored in it. |
Size | The number of feature tag/value pairs stored in the container. |
Values | The value associated with the given AFeatureTag . |
Constructors
Name | Description |
---|---|
Assign | Copy constructor makes a weak copy of the underlying representation of the ASrc font feature settings. |
Finalize | Destroys the font feature settings. |
Initialize | Creates default initialized font feature settings. |
Operators
Name | Description |
---|---|
Equal(TBLFontFeatureSettings, TBLFontFeatureSettings) | Returns True if two font feature settings instances are equal. |
Equal(TBLFontFeatureSettings, Pointer) | Used to compare against nil (empty font feature settings). |
NotEqual(TBLFontFeatureSettings, TBLFontFeatureSettings) | Returns True if two font feature settings instances are not equal. |
NotEqual(TBLFontFeatureSettings, Pointer) | Used to compare against nil (empty font feature settings). |
Methods
Name | Description |
---|---|
Clear | |
Equals | Tests whether this and AOther font feature settings are equal. |
GetValue | Returns the value associated with the given AFeatureTag . |
HasValue | Tests whether the settings contains the given AFeatureTag . |
RemoveValue | Removes the given AFeatureTag and its associated value from the settings. |
Reset | Resets the font feature settings to a default constructed state. |
SetValue | Sets or inserts the given AFeatureTag to the settings, associating the AFeatureTag with AValue . |
Swap | Swaps the underlying representation with AOther . |
View | Returns a normalized view of tag/value pairs. |
Property Descriptions
Capacity
The container capacity.
property Capacity: NativeInt read GetCapacity
Type: NativeInt
IsEmpty
Whether the container is empty, which means that no tag/value pairs are stored in it.
property IsEmpty: Boolean read GetIsEmpty
Type: Boolean
Size
The number of feature tag/value pairs stored in the container.
property Size: NativeInt read GetSize
Type: NativeInt
Values
The value associated with the given AFeatureTag
.
See GetValue
and SetValue
for more information.
property Values[const AFeatureTag: TBLTag]: Integer read GetValue write SetValue
Type: Integer
Exceptions
EBlend2DError
: Raised on failure.
See Also
Constructor Descriptions
Assign
Copy constructor makes a weak copy of the underlying representation of the ASrc
font feature settings.
constructor Assign(var ADest: TBLFontFeatureSettings; const ASrc: TBLFontFeatureSettings); inline
Parameters
ADest
: TBLFontFeatureSettings
ASrc
: TBLFontFeatureSettings
Exceptions
EBlend2DError
: Raised on failure.
Finalize
Destroys the font feature settings.
destructor Finalize(var ADest: TBLFontFeatureSettings)
Parameters
ADest
: TBLFontFeatureSettings
Exceptions
EBlend2DError
: Raised on failure.
Initialize
Creates default initialized font feature settings.
constructor Initialize(out ADest: TBLFontFeatureSettings)
Parameters
ADest
: TBLFontFeatureSettings
Exceptions
EBlend2DError
: Raised on failure.
Operator Descriptions
Equal(TBLFontFeatureSettings, TBLFontFeatureSettings)
Returns True if two font feature settings instances are equal.
class operator Equal(const ALeft, ARight: TBLFontFeatureSettings): Boolean; inline; static
Parameters
ALeft
: TBLFontFeatureSettings
ARight
: TBLFontFeatureSettings
Returns
Boolean
Equal(TBLFontFeatureSettings, Pointer)
Used to compare against nil
(empty font feature settings).
class operator Equal(const ALeft: TBLFontFeatureSettings; const ARight: Pointer): Boolean; inline; static
Parameters
ALeft
: TBLFontFeatureSettings
ARight
: Pointer
Returns
Boolean
NotEqual(TBLFontFeatureSettings, TBLFontFeatureSettings)
Returns True if two font feature settings instances are not equal.
class operator NotEqual(const ALeft, ARight: TBLFontFeatureSettings): Boolean; inline; static
Parameters
ALeft
: TBLFontFeatureSettings
ARight
: TBLFontFeatureSettings
Returns
Boolean
NotEqual(TBLFontFeatureSettings, Pointer)
Used to compare against nil
(empty font feature settings).
class operator NotEqual(const ALeft: TBLFontFeatureSettings; const ARight: Pointer): Boolean; inline; static
Parameters
ALeft
: TBLFontFeatureSettings
ARight
: Pointer
Returns
Boolean
Method Descriptions
Clear
procedure Clear; inline
Equals(TBLFontFeatureSettings)
Tests whether this and AOther
font feature settings are equal.
function Equals(const AOther: TBLFontFeatureSettings): Boolean; inline
Parameters
AOther
: TBLFontFeatureSettings
Returns
Boolean
GetValue(TBLTag)
Returns the value associated with the given AFeatureTag
.
If the AFeatureTag
doesn't exist or is invalid -1
is returned.
function GetValue(const AFeatureTag: TBLTag): Integer; inline
Parameters
AFeatureTag
: TBLTag
Returns
Integer
HasValue(TBLTag)
Tests whether the settings contains the given AFeatureTag
.
function HasValue(const AFeatureTag: TBLTag): Boolean; inline
Parameters
AFeatureTag
: TBLTag
Returns
Boolean
RemoveValue(TBLTag)
Removes the given AFeatureTag
and its associated value from the settings.
Nothing happens if the AFeatureTag
is not in the settings.
procedure RemoveValue(const AFeatureTag: TBLTag); inline
Exceptions
EBlend2DError
: Raised on failure.
Parameters
AFeatureTag
: TBLTag
Reset
Resets the font feature settings to a default constructed state.
procedure Reset; inline
SetValue(TBLTag, Integer)
Sets or inserts the given AFeatureTag
to the settings, associating the AFeatureTag
with AValue
.
The AFeatureTag
must be valid, which means that it must contain 4 characters within ' ' to '~' range - [32, 126] in ASCII. If the given AFeatureTag
is not valid or AValue
is out of range (maximum value is 65535
) an error is raised.
The following tags only support values that are either 0 (disabled) or 1 (enabled):
- 'case'
- 'clig'
- 'cpct'
- 'cpsp'
- 'dlig'
- 'dnom'
- 'expt'
- 'falt'
- 'frac'
- 'fwid'
- 'halt'
- 'hist'
- 'hwid'
- 'jalt'
- 'kern'
- 'liga'
- 'lnum'
- 'onum'
- 'ordn'
- 'palt'
- 'pcap'
- 'ruby'
- 'smcp'
- 'subs'
- 'sups'
- 'titl'
- 'tnam'
- 'tnum'
- 'unic'
- 'valt'
- 'vkrn'
- 'zero'
Trying to use any other value with these tags would fail.
procedure SetValue(const ATag: TBLTag; const AValue: Integer); inline
Exceptions
EBlend2DError
: Raised on failure.
Parameters
ATag
: TBLTag
AValue
: Integer
Swap(TBLFontFeatureSettings)
Swaps the underlying representation with AOther
.
procedure Swap(var AOther: TBLFontFeatureSettings); inline
Parameters
AOther
: TBLFontFeatureSettings
View
Returns a normalized view of tag/value pairs.
function View: TBLFontFeatureSettingsView; inline
Exceptions
EBlend2DError
: Raised on failure.