diff --git a/Userland/Applications/FontEditor/FontEditor.cpp b/Userland/Applications/FontEditor/FontEditor.cpp index 7a6babc59c..393cb01965 100644 --- a/Userland/Applications/FontEditor/FontEditor.cpp +++ b/Userland/Applications/FontEditor/FontEditor.cpp @@ -253,15 +253,14 @@ void FontEditorWidget::initialize(const String& path, RefPtr&& m_path = path; m_edited_font = edited_font; + m_glyph_map_widget->initialize(*m_edited_font); m_glyph_editor_widget->initialize(*m_edited_font); + m_glyph_editor_container->set_fixed_size(m_glyph_editor_widget->preferred_width(), m_glyph_editor_widget->preferred_height()); m_left_column_container->set_fixed_width(m_glyph_editor_widget->preferred_width()); m_glyph_editor_width_spinbox->set_enabled(!m_edited_font->is_fixed_width()); m_glyph_editor_width_spinbox->set_max(m_edited_font->max_glyph_width()); - m_glyph_map_widget->initialize(*m_edited_font); - m_glyph_map_widget->set_selected_glyph('A'); - m_name_textbox->set_text(m_edited_font->name()); m_family_textbox->set_text(m_edited_font->family()); @@ -273,6 +272,8 @@ void FontEditorWidget::initialize(const String& path, RefPtr&& m_fixed_width_checkbox->set_checked(m_edited_font->is_fixed_width()); + m_glyph_map_widget->set_selected_glyph('A'); + if (on_initialize) on_initialize(); } diff --git a/Userland/Applications/FontEditor/GlyphMapWidget.cpp b/Userland/Applications/FontEditor/GlyphMapWidget.cpp index 28b9119934..b115472718 100644 --- a/Userland/Applications/FontEditor/GlyphMapWidget.cpp +++ b/Userland/Applications/FontEditor/GlyphMapWidget.cpp @@ -45,6 +45,7 @@ void GlyphMapWidget::initialize(Gfx::BitmapFont& mutable_font) return; m_font = mutable_font; m_glyph_count = mutable_font.glyph_count(); + m_selected_glyph = 0; vertical_scrollbar().set_step(font().glyph_height() + m_vertical_spacing); }