From d7cd98f636c66325f2de6f3e98efe4652dd2d89a Mon Sep 17 00:00:00 2001 From: Benau Date: Tue, 11 Jun 2019 16:30:06 +0800 Subject: [PATCH] Use a smaller ratio to waste less space --- src/font/bold_face.cpp | 4 ++-- src/font/digit_face.cpp | 5 ++--- src/font/regular_face.cpp | 5 ++--- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/font/bold_face.cpp b/src/font/bold_face.cpp index 2b4a9c3d9..cfdc58140 100644 --- a/src/font/bold_face.cpp +++ b/src/font/bold_face.cpp @@ -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(); diff --git a/src/font/digit_face.cpp b/src/font/digit_face.cpp index 914853529..ccf289c84 100644 --- a/src/font/digit_face.cpp +++ b/src/font/digit_face.cpp @@ -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 // ---------------------------------------------------------------------------- diff --git a/src/font/regular_face.cpp b/src/font/regular_face.cpp index 9782198c7..97e293270 100644 --- a/src/font/regular_face.cpp +++ b/src/font/regular_face.cpp @@ -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 // ----------------------------------------------------------------------------