summaryrefslogtreecommitdiff
path: root/src/gui/font.c
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-08-16 15:49:12 -0300
committerGabriel Schneider <[email protected]>2026-08-18 23:44:42 -0300
commit1551e409c31992437cb2fa864f576d45c8433801 (patch)
treee2fae8451f87b735a1360c7c2e383fdc40165789 /src/gui/font.c
parentbe2a9957708cbf0c478ca861c4a1f0f227bbfe10 (diff)
downloadpardes-1551e409c31992437cb2fa864f576d45c8433801.tar.gz
pardes-1551e409c31992437cb2fa864f576d45c8433801.zip
big slow change: prebuilt shaders (SPIR-V/Metal), core gui reflow, docs, web + snapshot refresh
Diffstat (limited to 'src/gui/font.c')
-rw-r--r--src/gui/font.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/gui/font.c b/src/gui/font.c
index e94480b5..9fc5e039 100644
--- a/src/gui/font.c
+++ b/src/gui/font.c
@@ -60,6 +60,17 @@ UIFont *ui_font_new(const uint8_t *data, int32_t len) {
return f;
}
+const char *ui_font_name(UIFont *f) {
+ if (!f || !f->face)
+ return NULL;
+ const char *postscript = FT_Get_Postscript_Name(f->face);
+ if (postscript && postscript[0])
+ return postscript;
+ if (f->face->family_name && f->face->family_name[0])
+ return f->face->family_name;
+ return NULL;
+}
+
int ui_font_has_glyph(UIFont *f, int32_t cp) {
if (!f || cp < 0)
return 0;