compute Font advance from that of "x" glyph
This commit is contained in:
parent
91e6988fce
commit
da73f62845
@ -31,6 +31,14 @@ namespace jes
|
|||||||
|
|
||||||
m_line_height = round_up_26_6(m_face->size->metrics.height);
|
m_line_height = round_up_26_6(m_face->size->metrics.height);
|
||||||
|
|
||||||
|
GlyphRef x_glyph = load_glyph('x');
|
||||||
|
if (x_glyph.is_null())
|
||||||
|
{
|
||||||
|
std::cerr << "Could not load 'x' glyph from font" << fname << std::endl;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
m_advance = x_glyph->get_advance();
|
||||||
|
|
||||||
m_loaded = true;
|
m_loaded = true;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user