Skip to content

FontManager

DPI aware font manager. More...

#include "GUI/Fonts/FontManager.h"

Public Functions

Name
voidgenerateFonts(float dpiScale)<br>Load and generate font atlas for the specific dpi scaling factor.
ImFont *getFont(std::string name)<br>Get a particular font.
voidsetDefaultFont(std::string name)<br>Set which font acts as the ImGui default font.

Detailed Description

cpp
class FontManager;
class FontManager;

DPI aware font manager.

Loads and caches fonts for any requested DPI scale.

Public Functions Documentation

function generateFonts

cpp
void generateFonts(
    float dpiScale
)
void generateFonts(
    float dpiScale
)

Load and generate font atlas for the specific dpi scaling factor.

function getFont

cpp
inline ImFont * getFont(
    std::string name
)
inline ImFont * getFont(
    std::string name
)

Get a particular font.

Parameters:

  • name String identifier of the font (hardcoded currently).

Such a font must have been previously loaded by generateFonts().

function setDefaultFont

cpp
void setDefaultFont(
    std::string name
)
void setDefaultFont(
    std::string name
)

Set which font acts as the ImGui default font.


Updated on 2025-05-31 at 12:55:30 +0000