1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 17:18:11 +00:00

FontEditor: Set correct mean- and baseline ranges for new fonts

Fixes out-of-bounds lines in glyph editor
This commit is contained in:
thankyouverycool 2021-04-22 14:20:57 -04:00 committed by Andreas Kling
parent bada590b91
commit 8b3a92de37
2 changed files with 3 additions and 2 deletions

View file

@ -442,6 +442,9 @@ void FontEditorWidget::initialize(const String& path, RefPtr<Gfx::BitmapFont>&&
m_presentation_spinbox->set_value(m_edited_font->presentation_size());
m_spacing_spinbox->set_value(m_edited_font->glyph_spacing());
m_mean_line_spinbox->set_range(0, max(m_edited_font->glyph_height() - 2, 0), false);
m_baseline_spinbox->set_range(0, max(m_edited_font->glyph_height() - 2, 0), false);
m_mean_line_spinbox->set_value(m_edited_font->mean_line());
m_baseline_spinbox->set_value(m_edited_font->baseline());