Information for how to display text data.
More...
|
| bool | executeAnsiiCode (uint04 ansii_code, const Font &default_font) |
| | Applies an ANSI escape code to modify the font style.
|
| const File & | file () const |
| | Gets the file path associated with this font.
|
| bool | findBestFileIfNeeded (bool allow_backup_file=true) |
| | Locates the best matching font file if one has not been set.
|
| bool | hasBoldFamily () const |
| | Checks whether a bold variant of this font family exists.
|
| bool | hasItalicFamily () const |
| | Checks whether an italic variant of this font family exists.
|
| bool | isBold () const |
| | Checks whether the font style is bold.
|
| bool | isItalic () const |
| | Checks whether the font style is italic.
|
| StringView | name () const |
| | Gets the font family name.
|
| bool | operator!= (const Font &font) const |
| | Checks inequality between two Font objects.
|
| bool | operator== (const Font &font) const |
| | Checks equality between two Font objects.
|
| void | setFile (const File &file) |
| | Sets the file path for this font.
|
| void | setHasBoldFamily (bool has_bold_family) |
| | Sets whether a bold variant of this font family exists.
|
| void | setHasItalicFamily (bool has_italic_family) |
| | Sets whether an italic variant of this font family exists.
|
| void | setIsBold (bool is_bold) |
| | Sets whether the font style is bold.
|
| void | setIsItalic (bool is_italic) |
| | Sets whether the font style is italic.
|
| void | setName (const StringView &name) |
| | Sets the font family name.
|
|
|
String | app_font_name |
| | Application-specific font identifier name.
|
|
RGBColor | color = Constant<RGBColor>::Invalid |
| | Font rendering color.
|
|
fltp08 | fixed_width = Constant<fltp08>::Invalid |
| | Fixed character width override.
|
|
uint04 | index = 0 |
| | Index of the font face within a font file.
|
|
bool | is_overstrike = false |
| | Whether the font style includes overstrike.
|
|
bool | is_strikethrough = false |
| | Whether the font style includes strikethrough.
|
|
bool | is_underline = false |
| | Whether the font style includes underline.
|
|
fltp08 | pixel_size = Constant<fltp08>::Invalid |
| | Font size in pixels.
|
|
fltp08 | point_size = Constant<fltp08>::Invalid |
| | Font size in points.
|
|
fltp08 | tab_advance = Constant<fltp08>::Invalid |
| | Horizontal advance distance for tab characters.
|
|
|
std::function< Font(wchar_t character)> | m_fallback_font |
| | Callback to find a fallback font for unsupported characters.
|
|
File | m_file |
| | Cached file path for the font.
|
|
bool | m_has_bold_family = false |
| | Whether a bold variant of this font family exists.
|
|
bool | m_has_italic_family = false |
| | Whether an italic variant of this font family exists.
|
|
bool | m_is_bold = false |
| | Whether the font is bold.
|
|
bool | m_is_italic = false |
| | Whether the font is italic.
|
|
String | m_name |
| | The font family name.
|
Information for how to display text data.
Definition at line 45 of file Font.h.
◆ executeAnsiiCode()
| bool Font::executeAnsiiCode |
( |
uint04 | ansii_code, |
|
|
const Font & | default_font ) |
Applies an ANSI escape code to modify the font style.
- Parameters
-
| [in] | ansii_code | The ANSI code to execute. |
| [in] | default_font | The default font to revert to when a reset code is encountered. |
- Returns
- True if the code was recognized and applied.
◆ file()
| const File & Font::file |
( |
| ) |
const |
|
inline |
Gets the file path associated with this font.
- Returns
- A const reference to the font file.
Definition at line 139 of file Font.h.
References m_file.
Referenced by setFile().
◆ findBestFileIfNeeded()
| bool Font::findBestFileIfNeeded |
( |
bool | allow_backup_file = true | ) |
|
Locates the best matching font file if one has not been set.
- Parameters
-
| [in] | allow_backup_file | Whether to fall back to a backup font file if exact match is not found. |
- Returns
- True if a suitable font file was found.
◆ hasBoldFamily()
| bool Font::hasBoldFamily |
( |
| ) |
const |
Checks whether a bold variant of this font family exists.
- Returns
- True if a bold family variant is available.
◆ hasItalicFamily()
| bool Font::hasItalicFamily |
( |
| ) |
const |
Checks whether an italic variant of this font family exists.
- Returns
- True if an italic family variant is available.
◆ isBold()
| bool Font::isBold |
( |
| ) |
const |
|
inline |
Checks whether the font style is bold.
- Returns
- True if the font is bold.
Definition at line 71 of file Font.h.
References m_is_bold.
◆ isItalic()
| bool Font::isItalic |
( |
| ) |
const |
|
inline |
Checks whether the font style is italic.
- Returns
- True if the font is italic.
Definition at line 77 of file Font.h.
References m_is_italic.
◆ name()
◆ operator!=()
| bool Font::operator!= |
( |
const Font & | font | ) |
const |
Checks inequality between two Font objects.
- Parameters
-
| [in] | font | The font to compare against. |
- Returns
- True if any font properties differ.
◆ operator==()
| bool Font::operator== |
( |
const Font & | font | ) |
const |
Checks equality between two Font objects.
- Parameters
-
| [in] | font | The font to compare against. |
- Returns
- True if all font properties are equal.
◆ setFile()
| void Font::setFile |
( |
const File & | file | ) |
|
|
inline |
Sets the file path for this font.
- Parameters
-
| [in] | file | The font file to assign. |
Definition at line 152 of file Font.h.
References file(), and m_file.
◆ setHasBoldFamily()
| void Font::setHasBoldFamily |
( |
bool | has_bold_family | ) |
|
|
inline |
Sets whether a bold variant of this font family exists.
- Parameters
-
| [in] | has_bold_family | True if a bold family variant is available. |
Definition at line 83 of file Font.h.
References m_has_bold_family.
◆ setHasItalicFamily()
| void Font::setHasItalicFamily |
( |
bool | has_italic_family | ) |
|
|
inline |
Sets whether an italic variant of this font family exists.
- Parameters
-
| [in] | has_italic_family | True if an italic family variant is available. |
Definition at line 89 of file Font.h.
References m_has_italic_family.
◆ setIsBold()
| void Font::setIsBold |
( |
bool | is_bold | ) |
|
Sets whether the font style is bold.
- Parameters
-
| [in] | is_bold | True to make the font bold. |
◆ setIsItalic()
| void Font::setIsItalic |
( |
bool | is_italic | ) |
|
Sets whether the font style is italic.
- Parameters
-
| [in] | is_italic | True to make the font italic. |
◆ setName()
Sets the font family name.
- Parameters
-
| [in] | name | The font family name to set. |
References name().
The documentation for this class was generated from the following file: