#include </d/a/AeonGUI/AeonGUI/include/aeongui/FontDatabase.hpp>
|
| static void | Initialize () |
| | Initialize the font database. Call once at startup.
|
|
static void | Finalize () |
| | Finalize the font database. Call once at shutdown.
|
| static void | AddFontDirectory (const std::string &aPath) |
| | Add a directory of font files (.ttf, .otf, etc.) to the database.
|
| static void | AddFontFile (const std::string &aPath) |
| | Add a single font file to the database.
|
| static FcConfig * | GetFcConfig () |
| | Get the FcConfig used by the font database.
|
| static PangoFontMap * | GetFontMap () |
| | Get the PangoFontMap backed by the local font database.
|
| static PangoContext * | CreateContext () |
| | Create a new PangoContext from the local font map.
|
FontDatabase provides a local font database for AeonGUI, independent of system-installed fonts. It uses FcConfig to load fonts from application-provided directories. It also manages a PangoFontMap backed by the local FcConfig.
This is a singleton; call Initialize()/Finalize() once.
◆ AddFontDirectory()
| void AeonGUI::FontDatabase::AddFontDirectory |
( |
const std::string & | aPath | ) |
|
|
static |
Add a directory of font files (.ttf, .otf, etc.) to the database.
- Parameters
-
| aPath | Path to the font directory. |
- Exceptions
-
| std::runtime_error | on failure. |
◆ AddFontFile()
| void AeonGUI::FontDatabase::AddFontFile |
( |
const std::string & | aPath | ) |
|
|
static |
Add a single font file to the database.
- Parameters
-
| aPath | Path to the font file. |
- Exceptions
-
| std::runtime_error | on failure. |
◆ CreateContext()
| PangoContext * AeonGUI::FontDatabase::CreateContext |
( |
| ) |
|
|
static |
Create a new PangoContext from the local font map.
- Returns
- Pointer to a new PangoContext.
◆ GetFcConfig()
| FcConfig * AeonGUI::FontDatabase::GetFcConfig |
( |
| ) |
|
|
static |
Get the FcConfig used by the font database.
- Returns
- Pointer to the FcConfig.
◆ GetFontMap()
| PangoFontMap * AeonGUI::FontDatabase::GetFontMap |
( |
| ) |
|
|
static |
Get the PangoFontMap backed by the local font database.
- Returns
- Pointer to the PangoFontMap.
◆ Initialize()
| void AeonGUI::FontDatabase::Initialize |
( |
| ) |
|
|
static |
Initialize the font database. Call once at startup.
- Exceptions
-
| std::runtime_error | on failure. |
The documentation for this class was generated from the following files:
- /d/a/AeonGUI/AeonGUI/include/aeongui/FontDatabase.hpp
- /d/a/AeonGUI/AeonGUI/core/FontDatabase.cpp