From cab315bed1521f1c2dd1318be75e261d8ac65ad0 Mon Sep 17 00:00:00 2001 From: Adam Harrison Date: Sun, 17 Oct 2021 00:22:27 -0400 Subject: [PATCH] Added in a rectdraw when a fallback glyph isn't present. --- src/renderer.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/renderer.c b/src/renderer.c index a70111fa..ade84066 100644 --- a/src/renderer.c +++ b/src/renderer.c @@ -259,6 +259,8 @@ float ren_draw_text(RenFont **fonts, const char *text, float x, int y, RenColor int start_x = floor(pen_x) + metric->bitmap_left; int end_x = (metric->x1 - metric->x0) + start_x; int glyph_end = metric->x1, glyph_start = metric->x0; + if (!metric->loaded && codepoint > 0xFF) + ren_draw_rect((RenRect){ start_x + 1, y, font->space_advance - 1, ren_font_group_get_height(fonts) }, color); if (set->surface && color.a > 0 && end_x >= clip.x && start_x < clip_end_x) { unsigned char* source_pixels = set->surface->pixels; for (int line = metric->y0; line < metric->y1; ++line) {