Fix incorrect font rendering offset

This commit is contained in:
MysterD 2023-04-02 23:06:06 -07:00
parent 192d47aea0
commit 01b2cc2997
1 changed files with 2 additions and 2 deletions

View File

@ -15,7 +15,7 @@ static void djui_font_normal_render_char(char* c) {
u32 ty = index / 32; u32 ty = index / 32;
extern ALIGNED8 const u8 texture_font_normal[]; extern ALIGNED8 const u8 texture_font_normal[];
djui_gfx_render_texture_tile(texture_font_normal, 512, 256, 32, tx * 16 + 1, ty * 32, 16, 32); djui_gfx_render_texture_tile(texture_font_normal, 512, 256, 32, tx * 16, ty * 32, 16, 32);
} }
static f32 djui_font_normal_char_width(char* c) { static f32 djui_font_normal_char_width(char* c) {
@ -53,7 +53,7 @@ static void djui_font_title_render_char(char* c) {
u32 ty = index / 16; u32 ty = index / 16;
extern ALIGNED8 const u8 texture_font_title[]; extern ALIGNED8 const u8 texture_font_title[];
djui_gfx_render_texture_tile(texture_font_title, 1024, 512, 32, tx * 64 + 1, ty * 64, 64, 64); djui_gfx_render_texture_tile(texture_font_title, 1024, 512, 32, tx * 64, ty * 64, 64, 64);
} }
static f32 djui_font_title_char_width(char* text) { static f32 djui_font_title_char_width(char* text) {