summaryrefslogtreecommitdiff
path: root/src/text.h
diff options
context:
space:
mode:
authorFabrice <fabrice@schaub-dev.xyz>2026-02-13 07:49:24 +0100
committerFabrice <fabrice@schaub-dev.xyz>2026-02-13 07:49:24 +0100
commit22590b99e826b6ad16303d39b47f4925e9e45c22 (patch)
treef5580c8b01d1ef3a8e7265ae5d5faab9d6897ebd /src/text.h
parentb22b4f825e25cc41ec2119911db3945642099ab5 (diff)
rasterizing full text
Diffstat (limited to 'src/text.h')
-rw-r--r--src/text.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/text.h b/src/text.h
index 13b0dcd..5b578d0 100644
--- a/src/text.h
+++ b/src/text.h
@@ -46,8 +46,8 @@ enum font_error_e : u8 {
};
struct font_s {
+ struct font_context_s* context;
FT_Face face;
- u32 font_size;
struct atlas_s atlas;
struct hashmap_s<codepoint_t, struct glyph_s> cached;
@@ -58,7 +58,7 @@ enum font_error_e wayc_font_init(struct font_s* font,
const char* path, u32 font_size,
u32 atlas_width, u32 atlas_height);
-enum font_error_e wayc_font_render(struct font_s* font, codepoint_t codepoint,
+enum font_error_e wayc_font_raster(struct font_s* font, codepoint_t codepoint,
struct glyph_s* glyph);
static inline enum font_error_e wayc_font_flush(struct font_s* font) {
@@ -66,4 +66,8 @@ static inline enum font_error_e wayc_font_flush(struct font_s* font) {
return (enum font_error_e)wayc_max(atlas_err, FONT_ERROR_NONE);
}
+enum font_error_e wayc_font_raster_text(struct font_s* font, const char* text,
+ usize text_len, struct glyph_s* glyphs,
+ usize max_glyphs);
+
void wayc_font_deinit(struct font_s* font);