Add in agg_font_render method to get face's units to em

This commit is contained in:
Francesco Abbate 2020-05-30 16:25:13 +02:00
parent d9dea5d122
commit 0fea5d9d25
2 changed files with 6 additions and 0 deletions

View File

@ -583,6 +583,11 @@ namespace agg
return (m_cur_face ? m_cur_face->height : -1);
}
int font_engine_freetype_base::face_units_em() const
{
return (m_cur_face ? m_cur_face->units_per_EM : -1);
}
//------------------------------------------------------------------------
double font_engine_freetype_base::ascender() const
{

View File

@ -84,6 +84,7 @@ namespace agg
double ascender() const;
double descender() const;
int face_height() const;
int face_units_em()const;
bool hinting() const { return m_hinting; }
bool flip_y() const { return m_flip_y; }