(vulkan_raster_font.c) Cleanups
This commit is contained in:
parent
765e636214
commit
ee484b693c
|
@ -106,9 +106,8 @@ static int vulkan_get_message_width(void *data, const char *msg,
|
||||||
font->font_driver->get_glyph(font->font_data, (uint8_t)msg[i]);
|
font->font_driver->get_glyph(font->font_data, (uint8_t)msg[i]);
|
||||||
if (!glyph) /* Do something smarter here ... */
|
if (!glyph) /* Do something smarter here ... */
|
||||||
glyph = font->font_driver->get_glyph(font->font_data, '?');
|
glyph = font->font_driver->get_glyph(font->font_data, '?');
|
||||||
if (!glyph)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
|
if (glyph)
|
||||||
delta_x += glyph->advance_x;
|
delta_x += glyph->advance_x;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -182,6 +181,7 @@ static void vulkan_raster_font_render_line(
|
||||||
width * inv_tex_size_x,
|
width * inv_tex_size_x,
|
||||||
height * inv_tex_size_y,
|
height * inv_tex_size_y,
|
||||||
&vk_color);
|
&vk_color);
|
||||||
|
|
||||||
font->vertices += 6;
|
font->vertices += 6;
|
||||||
|
|
||||||
delta_x += glyph->advance_x;
|
delta_x += glyph->advance_x;
|
||||||
|
|
Loading…
Reference in New Issue