JUCE
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
FontFeatureSetting Class Referencefinal

Represents a single OpenType font feature setting. More...

Public Member Functions

constexpr FontFeatureSetting (FontFeatureTag featureTag, uint32 featureValue) noexcept
 Constructs a feature setting with the specified tag and optional value.
 
constexpr bool operator< (const FontFeatureSetting &other) const
 
constexpr bool operator<= (const FontFeatureSetting &other) const
 
constexpr bool operator> (const FontFeatureSetting &other) const
 
constexpr bool operator>= (const FontFeatureSetting &other) const
 
constexpr bool operator== (const FontFeatureSetting &other) const
 
constexpr bool operator!= (const FontFeatureSetting &other) const
 

Public Attributes

FontFeatureTag tag
 The OpenType feature tag.
 
uint32 value
 The value for this feature.
 

Static Public Attributes

static constexpr auto featureEnabled = 1
 Common feature values for convenience.
 
static constexpr auto featureDisabled = 0
 Disable this feature (value=0).
 

Detailed Description

Represents a single OpenType font feature setting.

A font feature setting combines a FontFeatureTag with an optional value that controls the behavior of that feature. For example, a 'liga' (standard ligatures) feature can be enabled (value=1) or disabled (value=0), while other features like 'salt' (stylistic alternates) might accept a range of values to select specific alternates.

See also
FontFeatureTag, FontOptions, Font

Constructor & Destructor Documentation

◆ FontFeatureSetting()

constexpr FontFeatureSetting::FontFeatureSetting ( FontFeatureTag  featureTag,
uint32  featureValue 
)
constexprnoexcept

Constructs a feature setting with the specified tag and optional value.

Member Function Documentation

◆ operator<()

constexpr bool FontFeatureSetting::operator< ( const FontFeatureSetting other) const
constexpr

◆ operator<=()

constexpr bool FontFeatureSetting::operator<= ( const FontFeatureSetting other) const
constexpr

◆ operator>()

constexpr bool FontFeatureSetting::operator> ( const FontFeatureSetting other) const
constexpr

◆ operator>=()

constexpr bool FontFeatureSetting::operator>= ( const FontFeatureSetting other) const
constexpr

◆ operator==()

constexpr bool FontFeatureSetting::operator== ( const FontFeatureSetting other) const
constexpr

◆ operator!=()

constexpr bool FontFeatureSetting::operator!= ( const FontFeatureSetting other) const
constexpr

Member Data Documentation

◆ featureEnabled

constexpr auto FontFeatureSetting::featureEnabled = 1
staticconstexpr

Common feature values for convenience.

Enable this feature (value=1).

Referenced by FontOptions::withFeatureEnabled().

◆ featureDisabled

constexpr auto FontFeatureSetting::featureDisabled = 0
staticconstexpr

Disable this feature (value=0).

Referenced by FontOptions::withFeatureDisabled().

◆ tag

FontFeatureTag FontFeatureSetting::tag

The OpenType feature tag.

◆ value

uint32 FontFeatureSetting::value

The value for this feature.

Common values are 0 (featureDisabled) and 1 (featureEnabled), but some features support additional values for specific behaviors.