BLFontFeatureSettings Class Referencefinal [¶]
Font feature settings [C++ API].
Tests whether the container is empty, which means that no tag/value pairs are stored in it.
Returns the number of feature tag/value pairs stored in the container.
Returns the container capacity.
If the container is in SSO mode, it would return the SSO capacity, however, such capacity can only be used for simple feature tag/value pairs. Some tags from these can only hold a boolean value (0 or 1) and ther others can hold a value from 0 to 15. So, if any tag/value pair requires a greater value than 15 it would never be able to use SSO representation.
Returns a normalized view of tag/value pairs as an iterable BLFontFeatureItem array in the output view out
.
If the container is in SSO mode then all BLFontFeatureItem values will be created from the underlying SSO representation and BLFontFeatureSettingsView::data will point to BLFontFeatureSettingsView::sso_data. If the container is dynamic, BLFontFeatureSettingsView::sso_data won't be initialized and BLFontFeatureSettingsView::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.
Tests whether the settings contains the given feature_tag
.
Returns the value associated with the given feature_tag
.
If the feature_tag
doesn't exist or is invalid BL_FONT_FEATURE_INVALID_VALUE is returned.
Sets or inserts the given feature_tag
to the settings, associating the feature_tag
with value
.
The feature_tag
must be valid, which means that it must contain 4 characters within ' ' to '~' range - [32, 126] in ASCII. If the given feature_tag
is not valid or value
is out of range (maximum value is 65535
) BL_ERROR_INVALID_VALUE is returned.
The following tags only support values that are either 0 (disabled) or 1 (enabled):
Trying to use any other value with these tags would fail with BL_ERROR_INVALID_VALUE error.
Removes the given feature_tag
and its associated value from the settings.
Nothing happens if the feature_tag
is not in the settings (BL_SUCCESS is returned).
Tests whether this font feature settings is equal to other
- equality means that it has the same tag/value pairs.