--- a/src/text.c Thu Apr 18 21:53:53 2024 +0200 +++ b/src/text.c Thu Apr 18 22:53:55 2024 +0200 @@ -36,7 +36,7 @@ static void asc_text_draw(AscText const *node) { // Obtain shader - AscShaderSprite *shader = &asc_window_active->glctx.shader.sprite; + AscShaderSprite *shader = &asc_active_window->glctx.shader.sprite; // Upload model matrix glUniformMatrix4fv(shader->base.model, 1, @@ -59,7 +59,8 @@ } // Render text onto a surface - TTF_Font *font = asc_font_cache_validate(node->font)->ptr; + // TODO: obtain TTF_Font from font cache once it is repaired + TTF_Font *font = node->font.ptr; static int alignments[] = { TTF_WRAPPED_ALIGN_LEFT, TTF_WRAPPED_ALIGN_CENTER, @@ -101,7 +102,7 @@ node->base.position.x = (float) args.x; node->base.position.y = (float) args.y; node->max_width = args.max_width; - node->font = asc_context.active_font; + node->font = *asc_active_font; node->color = asc_context.ink; if (args.text == NULL) { node->text = cx_mutstr(strdup(" "));