Add function in agg_font_freetype to take face's height

This commit is contained in:
Francesco Abbate 2020-05-30 15:18:36 +02:00
parent f77261afa4
commit 4701c2899c
2 changed files with 6 additions and 0 deletions

View File

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

View File

@ -83,6 +83,7 @@ namespace agg
double width() const { return double(m_width) / 64.0; }
double ascender() const;
double descender() const;
int face_height() const;
bool hinting() const { return m_hinting; }
bool flip_y() const { return m_flip_y; }