From 959a2571af93843f0d516c5c3f5af61e18d22c83 Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Mon, 23 Jun 2014 13:08:29 -0400 Subject: [PATCH] add Font::get_line_height() --- src/gui/Font.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gui/Font.h b/src/gui/Font.h index a824920..ee7cae8 100644 --- a/src/gui/Font.h +++ b/src/gui/Font.h @@ -13,7 +13,9 @@ namespace jes Font(); ~Font(); bool load(FT_Library ft, const char * fname, size_t size); + int get_line_height() { return round_up_26_6(m_face->size->metrics.height); } protected: + int round_up_26_6(int val) { return (val + 63) >> 6u; } FT_Face m_face; bool m_loaded; };