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

Options that can be used to affect the layout produced by GlyphArrangement::addFittedText. More...

Public Member Functions

GlyphArrangementOptions withLineSpacing (float x) const
 We increment the distance between the baselines of subsequent lines with this value.
 
GlyphArrangementOptions withLineHeightMultiple (float x) const
 We multiply the original distance between the baselines of subsequent lines with this value.
 
const autogetLineSpacing () const
 
const autogetLineHeightMultiple () const
 
bool operator== (const GlyphArrangementOptions &other) const
 Equality operator.
 
bool operator!= (const GlyphArrangementOptions &other) const
 Inequality operator.
 
bool operator< (const GlyphArrangementOptions &other) const
 Less-than operator.
 
bool operator<= (const GlyphArrangementOptions &other) const
 Less-than-or-equal operator.
 
bool operator> (const GlyphArrangementOptions &other) const
 Greater-than operator.
 
bool operator>= (const GlyphArrangementOptions &other) const
 Greater-than-or-equal operator.
 

Detailed Description

Options that can be used to affect the layout produced by GlyphArrangement::addFittedText.

See also
GlyphArrangement::addFittedText

Member Function Documentation

◆ withLineSpacing()

GlyphArrangementOptions GlyphArrangementOptions::withLineSpacing ( float  x) const

We increment the distance between the baselines of subsequent lines with this value.

Line spacing is added below the line's descender, and doesn't affect the first line's baseline.

The total distance between baselines is lineHeight * lineHeightMultiple + lineSpacing.

References withMember(), and x.

◆ withLineHeightMultiple()

GlyphArrangementOptions GlyphArrangementOptions::withLineHeightMultiple ( float  x) const

We multiply the original distance between the baselines of subsequent lines with this value.

The line height multiple is applied to both the ascender and descender, hence it affects the first line's baseline.

The total distance between baselines is lineHeight * lineHeightMultiple + lineSpacing.

References withMember(), and x.

◆ getLineSpacing()

const auto & GlyphArrangementOptions::getLineSpacing ( ) const

◆ getLineHeightMultiple()

const auto & GlyphArrangementOptions::getLineHeightMultiple ( ) const

◆ operator==()

bool GlyphArrangementOptions::operator== ( const GlyphArrangementOptions other) const

Equality operator.

◆ operator!=()

bool GlyphArrangementOptions::operator!= ( const GlyphArrangementOptions other) const

Inequality operator.

◆ operator<()

bool GlyphArrangementOptions::operator< ( const GlyphArrangementOptions other) const

Less-than operator.

Allows GlyphArrangementOptions to be used as keys in a map.

◆ operator<=()

bool GlyphArrangementOptions::operator<= ( const GlyphArrangementOptions other) const

Less-than-or-equal operator.

◆ operator>()

bool GlyphArrangementOptions::operator> ( const GlyphArrangementOptions other) const

Greater-than operator.

◆ operator>=()

bool GlyphArrangementOptions::operator>= ( const GlyphArrangementOptions other) const

Greater-than-or-equal operator.