BLFontVariationSettings Class Referencefinal

Font variation settings [C++ API].

Member Functions

Construction & Destruction
Overloaded Operators
Common Functionality
Accessors
Equality & Comparison

Additional Inherited Members

- Public Attributes inherited from BLObjectCore

Member Function Documentation

bool BLFontVariationSettings::empty() const◆ 

Tests whether the container is empty, which means that no tag/value pairs are stored in it.

size_t BLFontVariationSettings::size() const◆ 

Returns the number of tag/value pairs stored in the container.

size_t BLFontVariationSettings::capacity() const◆ 

Returns the container capacity.

Note
If the container is in SSO mode, it would return the SSO capacity, however, such capacity can only be used for simple tag/value pairs (where the tag is known by Blend2D and has associated an internal ID that represents it).

BLResult BLFontVariationSettings::getView(BLFontVariationSettingsView* out) const◆ 

Returns a normalized view of tag/value pairs as an iterable BLFontVariationItem array in the output view.

Note
If the container is in SSO mode then all BLFontVariationItem values will be created from the underlying SSO representation and BLFontVariationSettingsView::data will point to BLFontVariationSettingsView::ssoData. If the container is dynamic, BLFontVariationSettingsView::ssoData won't be initialized and BLFontVariationSettingsView::data will point to the container's data. This means that the view cannot outlive the container, and also during iteration the view the container cannot be modified as that could invalidate the entire view.

bool BLFontVariationSettings::hasValue(BLTag variationTag) const◆ 

Tests whether the settings contains the given variationTag.

float BLFontVariationSettings::getValue(BLTag variationTag) const◆ 

Returns the value associated with the given variationTag.

If the variationTag doesn't exist or is invalid NaN is returned.

BLResult BLFontVariationSettings::setValue(BLTag variationTag, float value)◆ 

Sets or inserts the given variationTag to the settings and associates it with the given value.

BLResult BLFontVariationSettings::removeValue(BLTag variationTag)◆ 

Removes the given variationTag and its value from the settings.

Nothing happens if the variationTag is not in the settings (BL_SUCCESS is returned).

bool BLFontVariationSettings::equals(const BLFontVariationSettings& other) const◆ 

Tests whether this font variation settings is equal to other - equality means that it has the same tag/value pairs.