Files
kryon/examples/kryon_example_font.h
T
2026-07-20 11:25:19 -03:00

29 lines
582 B
C

#ifndef EXAMPLE_UI_FONT_H
#define EXAMPLE_UI_FONT_H
#include "ui_text.h"
#include "kryon.h"
static void
LoadExampleUIFont(void)
{
Font font = LoadUIFontAsset("../fonts/noto/NotoSans-Regular.ttf",
UI_TEXT_BASE_SIZE);
if(font.texture.id == 0)
font = LoadUIFontAsset("fonts/noto/NotoSans-Regular.ttf",
UI_TEXT_BASE_SIZE);
if(font.texture.id != 0) {
RegisterUIFont("default", font);
UseUIFont("default");
}
}
static void
UnloadExampleUIFont(void)
{
ClearUIFonts();
}
#endif