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

Represents a single OpenType font feature. More...

Public Member Functions

constexpr FontFeatureTag (const char(&string)[5])
 Constructs a feature from the specified tag string.
 
constexpr FontFeatureTag (uint32 tagValue)
 Constructs a feature from the specified tag value.
 
String toString () const
 Returns a string representation of this tag.
 
constexpr uint32 getTag () const
 Returns the Harfbuzz compatible OpenType tag as an unsigned 32-bit integer.
 
constexpr bool operator< (FontFeatureTag other) const
 Comparison based on tag value.
 
constexpr bool operator<= (FontFeatureTag other) const
 Comparison based on tag value.
 
constexpr bool operator> (FontFeatureTag other) const
 Comparison based on tag value.
 
constexpr bool operator>= (FontFeatureTag other) const
 Comparison based on tag value.
 
constexpr bool operator== (FontFeatureTag other) const
 Comparison based on tag value.
 
constexpr bool operator!= (FontFeatureTag other) const
 Comparison based on tag value.
 

Static Public Member Functions

static FontFeatureTag fromString (const String &tagString)
 Creates a new FontFeature with the specified tag.
 

Detailed Description

Represents a single OpenType font feature.

OpenType font features are typographic options that can be enabled or disabled to control text rendering behavior. Each feature is identified by a four-character tag (like 'liga' for standard ligatures or 'smcp' for small caps). These features allow fine-grained control over how text is displayed, including ligatures, number styles, stylistic alternates, and positioning adjustments.

The tag must be exactly 4 characters long.

See also
FontOptions, Font

Constructor & Destructor Documentation

◆ FontFeatureTag() [1/2]

constexpr FontFeatureTag::FontFeatureTag ( const char(&)  string[5])
constexpr

Constructs a feature from the specified tag string.

◆ FontFeatureTag() [2/2]

constexpr FontFeatureTag::FontFeatureTag ( uint32  tagValue)
explicitconstexpr

Constructs a feature from the specified tag value.

Member Function Documentation

◆ fromString()

static FontFeatureTag FontFeatureTag::fromString ( const String tagString)
static

Creates a new FontFeature with the specified tag.

◆ toString()

String FontFeatureTag::toString ( ) const

Returns a string representation of this tag.

◆ getTag()

constexpr uint32 FontFeatureTag::getTag ( ) const
constexpr

Returns the Harfbuzz compatible OpenType tag as an unsigned 32-bit integer.

◆ operator<()

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

Comparison based on tag value.

◆ operator<=()

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

Comparison based on tag value.

◆ operator>()

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

Comparison based on tag value.

◆ operator>=()

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

Comparison based on tag value.

◆ operator==()

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

Comparison based on tag value.

◆ operator!=()

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

Comparison based on tag value.