summaryrefslogtreecommitdiff
path: root/src/text.h
diff options
context:
space:
mode:
authorFabrice <fabrice@schaub-dev.xyz>2026-02-12 17:54:15 +0100
committerFabrice <fabrice@schaub-dev.xyz>2026-02-12 17:54:15 +0100
commit6c5bfa228502bd06989c1892d71c61add419a0ea (patch)
treed2a3fd0c76c60957a1facff0996f475e88e83443 /src/text.h
parent654cd13559cc8325f69eb38612c454b1db4bfca6 (diff)
oh je
Diffstat (limited to 'src/text.h')
-rw-r--r--src/text.h25
1 files changed, 21 insertions, 4 deletions
diff --git a/src/text.h b/src/text.h
index 6eb7df1..efaad8f 100644
--- a/src/text.h
+++ b/src/text.h
@@ -1,11 +1,28 @@
#pragma once
#include "freetype/freetype.h"
+#include "sokol_gfx.h"
+#include "utils.h"
-struct face_ctx_s {
- FT_Library library;
+enum font_context_error_e : u8 {
+ FONT_CONTEXT_ERROR_NONE = 0,
+ FONT_CONTEXT_ERROR_LOAD_LIBRARY,
};
-struct face_s {
+struct font_context_s {
+ FT_Library ft;
+ struct sg_pipeline pipeline;
+ struct sg_sampler sampler;
+};
+
+enum font_context_error_e font_context_init(struct font_context_s* context);
+void font_context_deinit(struct font_context_s* context);
+
+struct font_s {
FT_Face face;
-}; \ No newline at end of file
+ u8* source;
+
+ u8* staging;
+ bool staging_dirty;
+ struct sg_image atlas;
+};