summaryrefslogtreecommitdiff
path: root/src/text.h
diff options
context:
space:
mode:
authorFabrice <fabrice@schaub-dev.xyz>2026-02-11 21:55:20 +0100
committerFabrice <fabrice@schaub-dev.xyz>2026-02-11 21:55:20 +0100
commit555cfbe1ceeb879ecefcf8666225d3c28a19e6df (patch)
tree37a5b39f3663399ffaa9f1d5ff3cc0339b0ed6c4 /src/text.h
parent952dc19e0eeec2b0ba695970ac3f5a2997e39c77 (diff)
uploading to atlas
Diffstat (limited to 'src/text.h')
-rw-r--r--src/text.h9
1 files changed, 7 insertions, 2 deletions
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<codepoint_t, struct glyph_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);