From 555cfbe1ceeb879ecefcf8666225d3c28a19e6df Mon Sep 17 00:00:00 2001 From: Fabrice Date: Wed, 11 Feb 2026 21:55:20 +0100 Subject: uploading to atlas --- src/text.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/text.h') diff --git a/src/text.h b/src/text.h index a3ed9d1..09f813d 100644 --- a/src/text.h +++ b/src/text.h @@ -1,5 +1,6 @@ #pragma once +#include "cglm/types.h" #include "freetype/freetype.h" #include "hash.h" #include "rendering.h" @@ -19,7 +20,9 @@ struct font_context_s { enum font_context_error_e wayc_font_context_init(struct font_context_s* ctx); void wayc_font_context_deinit(struct font_context_s* ctx); -struct glyph_s {}; +struct glyph_s { + ivec2 uv0, uv1; +}; enum font_error_e { FONT_ERROR_NONE, @@ -32,10 +35,12 @@ struct font_s { u8* data; FT_Face face; struct hashmap_s cache; + ivec2 cursor; }; enum font_error_e wayc_font_init(struct font_s* font, - struct font_context_s* ctx, const char* path); + struct font_context_s* ctx, u32 fsize, + const char* path); enum font_error_e wayc_font_lookup(struct font_s* font, struct atlas_s* atlas, codepoint_t codepoint, struct glyph_s* out); void wayc_font_deinit(struct font_s* font); -- cgit v1.2.3