Use a smaller ratio to waste less space

This commit is contained in:
Benau 2019-06-11 16:30:06 +08:00
parent 1707ac7e1e
commit d7cd98f636
3 changed files with 6 additions and 8 deletions

View File

@ -32,8 +32,8 @@ BoldFace::BoldFace() : FontWithFace("BoldFace")
void BoldFace::init()
{
FontWithFace::init();
// Reserve some space for characters added later
m_font_max_height = m_glyph_max_height * 3 / 2;
// Reserve some space for characters added later in the next line
m_font_max_height = m_glyph_max_height * 7 / 5;
// Fallback font for emoji
RegularFace* rf = font_manager->getFont<RegularFace>();

View File

@ -30,9 +30,8 @@ DigitFace::DigitFace() : FontWithFace("DigitFace")
void DigitFace::init()
{
FontWithFace::init();
m_font_max_height = m_glyph_max_height * 3 / 2;
// Reserve some space for characters added later in the next line
m_font_max_height = m_glyph_max_height * 7 / 5;
} // init
// ----------------------------------------------------------------------------

View File

@ -30,9 +30,8 @@ RegularFace::RegularFace() : FontWithFace("RegularFace")
void RegularFace::init()
{
FontWithFace::init();
// Reserve some space for characters added later
m_font_max_height = m_glyph_max_height * 3 / 2;
// Reserve some space for characters added later in the next line
m_font_max_height = m_glyph_max_height * 7 / 5;
} // init
// ----------------------------------------------------------------------------