System/Utilities/TrueType: Add @stbtt_GetFontNameDefault

This commit is contained in:
Alec Murphy 2025-04-05 09:19:10 -04:00
parent 7969bf0993
commit 9c43ac1073
2 changed files with 12 additions and 0 deletions

View file

@ -47,4 +47,15 @@ U8* @stbtt_RenderText(stbtt_fontinfo* info, I32 b_w, I32 b_h, I32 l_h, U8* word)
} }
} }
U8* @stbtt_GetFontNameDefault(stbtt_fontinfo* font, I32* length)
{
U64 reg RDI rdi = font;
U64 reg RSI rsi = length;
no_warn rdi, rsi;
asm {
MOV RAX, STBTT_GETFONTNAMEDEFAULT
CALL RAX
}
}
"truetype "; "truetype ";

View file

@ -161,6 +161,7 @@ def generate_iso_c_file():
truetype_hc_fixup('STBTT_INITFONT', 'stbtt_InitFont', truetype_bin_path, truetype_hc_path) truetype_hc_fixup('STBTT_INITFONT', 'stbtt_InitFont', truetype_bin_path, truetype_hc_path)
truetype_hc_fixup('STBTT_RENDERTEXT', 'stbtt_RenderText', truetype_bin_path, truetype_hc_path) truetype_hc_fixup('STBTT_RENDERTEXT', 'stbtt_RenderText', truetype_bin_path, truetype_hc_path)
truetype_hc_fixup('STBTT_GETFONTNAMEDEFAULT', 'stbtt_GetFontNameDefault', truetype_bin_path, truetype_hc_path)
# Fixup addresses for Tlse.HC # Fixup addresses for Tlse.HC