JUCE v8.0.9
JUCE API
 
Loading...
Searching...
No Matches
juce::FontFeatureTag Class Referencefinal

Represents a single OpenType font feature. More...

#include <juce_FontFeatures.h>

Collaboration diagram for juce::FontFeatureTag:

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.
 
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.
 
String toString () const
 Returns a string representation of this tag.
 

Static Public Member Functions

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

Private Member Functions

 FontFeatureTag ()=default
 

Private Attributes

uint32 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

@tags{Graphics}

Constructor & Destructor Documentation

◆ FontFeatureTag() [1/3]

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

Constructs a feature from the specified tag string.

◆ FontFeatureTag() [2/3]

constexpr juce::FontFeatureTag::FontFeatureTag ( uint32  tagValue)
inlineexplicitconstexpr

Constructs a feature from the specified tag value.

◆ FontFeatureTag() [3/3]

juce::FontFeatureTag::FontFeatureTag ( )
privatedefault

Member Function Documentation

◆ fromString()

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

Creates a new FontFeature with the specified tag.

◆ getTag()

constexpr uint32 juce::FontFeatureTag::getTag ( ) const
inlineconstexpr

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

◆ operator!=()

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

Comparison based on tag value.

References tag.

◆ operator<()

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

Comparison based on tag value.

References tag.

◆ operator<=()

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

Comparison based on tag value.

References tag.

◆ operator==()

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

Comparison based on tag value.

References tag.

◆ operator>()

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

Comparison based on tag value.

References tag.

◆ operator>=()

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

Comparison based on tag value.

References tag.

◆ toString()

String juce::FontFeatureTag::toString ( ) const

Returns a string representation of this tag.

Member Data Documentation

◆ tag

uint32 juce::FontFeatureTag::tag
private

The documentation for this class was generated from the following file: