IndexTextBLFontVariationSettings

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

bool BLFontVariationSettings::is_empty() constnodiscardnoexcept[¶]

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

size_t BLFontVariationSettings::size() constnodiscardnoexcept[¶]

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

size_t BLFontVariationSettings::capacity() constnodiscardnoexcept[¶]

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::get_view() constnoexcept[¶]

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::sso_data. If the container is dynamic, BLFontVariationSettingsView::sso_data 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::has_value(
BLTag variation_tag
) constnodiscardnoexcept[¶]

Tests whether the settings contains the given variation_tag.

float BLFontVariationSettings::get_value(
BLTag variation_tag
) constnodiscardnoexcept[¶]

Returns the value associated with the given variation_tag.

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

BLResult BLFontVariationSettings::set_value(
BLTag variation_tag,
float value
)noexcept[¶]

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

BLResult BLFontVariationSettings::remove_value(
BLTag variation_tag
)noexcept[¶]

Removes the given variation_tag and its value from the settings.

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

bool BLFontVariationSettings::equals() constnodiscardnoexcept[¶]

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