Added in a rectdraw when a fallback glyph isn't present.
This commit is contained in:
parent
c7c4a3c528
commit
cab315bed1
|
@ -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 start_x = floor(pen_x) + metric->bitmap_left;
|
||||||
int end_x = (metric->x1 - metric->x0) + start_x;
|
int end_x = (metric->x1 - metric->x0) + start_x;
|
||||||
int glyph_end = metric->x1, glyph_start = metric->x0;
|
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) {
|
if (set->surface && color.a > 0 && end_x >= clip.x && start_x < clip_end_x) {
|
||||||
unsigned char* source_pixels = set->surface->pixels;
|
unsigned char* source_pixels = set->surface->pixels;
|
||||||
for (int line = metric->y0; line < metric->y1; ++line) {
|
for (int line = metric->y0; line < metric->y1; ++line) {
|
||||||
|
|
Loading…
Reference in New Issue