summaryrefslogtreecommitdiff
path: root/src/text.h
diff options
context:
space:
mode:
authorFabrice <fabrice@schaub-dev.xyz>2026-02-11 16:24:21 +0100
committerFabrice <fabrice@schaub-dev.xyz>2026-02-11 16:24:21 +0100
commit05078f4561c45a60cd208a9d3037ad1925a7e80a (patch)
treebceeff05d3221b56f112c8ff6c3b064cb2bdacc9 /src/text.h
parentcf3e6ac4c968b09b4e431b111162aea6041f47a6 (diff)
use err defers
Diffstat (limited to 'src/text.h')
-rw-r--r--src/text.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/text.h b/src/text.h
index cfd7a00..464b956 100644
--- a/src/text.h
+++ b/src/text.h
@@ -1,6 +1,7 @@
#pragma once
#include "freetype/freetype.h"
+#include "hash.h"
#include "utils.h"
enum font_context_error_e {
@@ -15,6 +16,12 @@ 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 font_cache_s {
+ struct hashmap_s<u32, struct glyph_s> glyphs;
+};
+
enum font_error_e {
FONT_ERROR_NONE,
FONT_ERROR_FILE_LOAD,
@@ -24,6 +31,7 @@ enum font_error_e {
struct font_s {
u8* data;
FT_Face face;
+ struct font_cache_s cache;
};
enum font_error_e wayc_font_init(struct font_s* font,