Add more debug information in font's bitmap images

This commit is contained in:
Francesco Abbate
2020-06-07 00:15:38 +02:00
parent b978873a58
commit e82d766c2b
3 changed files with 22 additions and 0 deletions
+3
View File
@@ -208,6 +208,9 @@ int FontRendererBakeFontBitmap(FontRenderer *font_renderer, int font_height,
glyph_info.yoff = -pad_y;
glyph_info.xadvance = (x_next - x) / subpixel_scale;
#ifdef FONT_RENDERER_DEBUG
glyph_info.ybaseline = pixels_height - 1 - y_baseline;
#endif
if (glyph_info.x1 > glyph_info.x0) {
glyph_lut_convolution(ren_buf, lcd_lut, cover_swap_buffer, glyph_info);
}
+3
View File
@@ -11,6 +11,9 @@ extern "C" {
typedef struct {
unsigned short x0, y0, x1, y1;
float xoff, yoff, xadvance;
#ifdef FONT_RENDERER_DEBUG
int ybaseline;
#endif
} GlyphBitmapInfo;
struct FontRendererImpl;