Add correct font's height calculation using AGG

Compute the height like in renderer.c
This commit is contained in:
Francesco Abbate committed 2020-05-30 16:26:10 +02:00
1 parent 0fea5d9d25
commit 010966d60d
2 files changed
+13 -3

No files matched your search

+8
View File
@@ -68,6 +68,14 @@ public:
return false;
}
float scale_for_em_to_pixels(float size) {
int units_per_em = m_feng.face_units_em();
if (units_per_em > 0) {
return size / units_per_em;
}
return 0.0;
}
bool load_font(const char *font_filename) {
if(m_feng.load_font(font_filename, 0, agg::glyph_ren_outline)) {
m_font_loaded = true;