From a81a011d738a0cbd36e0d4f8e17691424d6bb1a0 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Fri, 2 Jul 2021 22:36:33 +0200 Subject: Added UTF8 rendering support --- libs/libgui/gfx.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'libs/libgui/gfx.h') diff --git a/libs/libgui/gfx.h b/libs/libgui/gfx.h index 899bf4d..d78750a 100644 --- a/libs/libgui/gfx.h +++ b/libs/libgui/gfx.h @@ -72,9 +72,13 @@ enum gfx_filter { // Generalized font struct struct gfx_font { void *raw; - char *chars; + u8 *chars; vec2 size; - int char_size; + u32 char_size; + u32 total_size; + struct { + u8 unicode : 1; + } flags; }; struct gfx_context { @@ -98,8 +102,6 @@ struct gfx_context *gfx_clone(struct gfx_context *ctx) NONNULL; */ struct gfx_font *gfx_resolve_font(enum font_type font_type); -void gfx_write_char(struct gfx_context *ctx, vec2 pos, enum font_type font_type, u32 c, - char ch) NONNULL; void gfx_write(struct gfx_context *ctx, vec2 pos, enum font_type font_type, u32 c, const char *text) NONNULL; -- cgit v1.2.3