Use font_renderer in aGG font testing program

This commit is contained in:
Francesco Abbate
2020-06-01 16:57:33 +02:00
parent e291e7269a
commit b734390388
5 changed files with 130 additions and 185 deletions
+9
View File
@@ -79,6 +79,15 @@ int FontRendererBakeFontBitmap(FontRenderer *fr_, int font_height,
glyph_info.xadvance = x_next - x;
x = x_next_i;
#ifdef DEBUG_FONT_RENDERER
fprintf(stderr,
"glyph codepoint %3d (ascii: %1c), BOX (%3d, %3d) (%3d, %3d), "
"OFFSET (%.5g, %.5g), X ADVANCE %.5g\n",
codepoint, i,
glyph_info.x0, glyph_info.y0, glyph_info.x1, glyph_info.y1,
glyph_info.xoff, glyph_info.yoff, glyph_info.xadvance);
#endif
}
return res;
}
+1
View File
@@ -127,6 +127,7 @@ retry:
goto retry;
}
// FIXME: to be removed.
/* adjust glyph's xadvance */
for (int i = 0; i < 256; i++) {
set->glyphs[i].xadvance = floor(set->glyphs[i].xadvance);