diff options
Diffstat (limited to 'src/text.cc')
| -rw-r--r-- | src/text.cc | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/text.cc b/src/text.cc index d02cc77..0635440 100644 --- a/src/text.cc +++ b/src/text.cc @@ -19,9 +19,8 @@ static bool wayc_font_cache_lookup(struct font_s* font, codepoint_t codepoint, return ok; } -[[maybe_unused]] static void wayc_font_cache_insert(struct font_s* font, - codepoint_t codepoint, - struct glyph_s glyph) { +static void wayc_font_cache_insert(struct font_s* font, codepoint_t codepoint, + struct glyph_s glyph) { wayc_notnull(font); wayc_hashmap_insert(&font->cache, &codepoint, &glyph); } @@ -29,8 +28,14 @@ static bool wayc_font_cache_lookup(struct font_s* font, codepoint_t codepoint, enum font_context_error_e wayc_font_context_init(struct font_context_s* ctx) { wayc_notnull(ctx); + u32 vao; + glCreateVertexArrays(1, &vao); + if (vao == 0) return FONT_CONTEXT_ERROR_VAO_CREATION; + + + FT_Error err = FT_Init_FreeType(&ctx->library); - if (err) return FONT_CONTEXT_ERROR_LIBRARY; + if (err) return FONT_CONTEXT_ERROR_LIBRARY_LOADING; return FONT_CONTEXT_ERROR_NONE; } |
