OpenTTD Source 20261112-master-gbcbec5e63f
Font Class Reference

Container with information about a font. More...

#include <gfx_layout.h>

Inheritance diagram for Font:
FontState

Public Member Functions

constexpr auto operator<=> (const Font &) const =default
 Compare with another instance of this class.
FontCache & GetFontCache () const
 Get the font cache of this font.

Data Fields

FontSize fontsize = FontSize::End
 The font size.
ExtendedTextColour colour = TextColour::Invalid
 The text colour.

Detailed Description

Container with information about a font.

Definition at line 21 of file gfx_layout.h.

Member Function Documentation

◆ GetFontCache()

◆ operator<=>()

auto Font::operator<=> ( const Font & ) const
constexprdefault

Compare with another instance of this class.

Returns
The std::strong_ordering of the comparison.

Field Documentation

◆ colour

The text colour.

Definition at line 24 of file gfx_layout.h.

Referenced by DrawLayoutLine(), FontState::FontState(), FontState::PushColour(), and FontState::SetColour().

◆ fontsize

FontSize Font::fontsize = FontSize::End

The font size.

Definition at line 23 of file gfx_layout.h.

Referenced by DrawLayoutLine(), FontState::FontState(), FontState::SetFontSize(), and UniscribeShapeRun().


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