diff options
author | thankyouverycool <66646555+thankyouverycool@users.noreply.github.com> | 2022-01-31 20:54:27 -0500 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-02-01 10:06:26 +0100 |
commit | a593b8318997a872b9a45bc61c1372bd39bba424 (patch) | |
tree | 95cc544a6866a148fdfbc2e3d21bfcbab2943511 /Userland/Applications/DisplaySettings/FontSettingsWidget.cpp | |
parent | 96895cd22c06cfa82c5cc2c03b091bd855e16e3b (diff) | |
download | serenity-a593b8318997a872b9a45bc61c1372bd39bba424.zip |
LibGfx+Applications: Add human readable name helper for fonts
This returns a more comprehensible name than raw weight and slope
metrics and is intended for use in UIs. Now displays human readable
font names in FontSettings, TerminalSettings and CharacterMap.
Diffstat (limited to 'Userland/Applications/DisplaySettings/FontSettingsWidget.cpp')
-rw-r--r-- | Userland/Applications/DisplaySettings/FontSettingsWidget.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Applications/DisplaySettings/FontSettingsWidget.cpp b/Userland/Applications/DisplaySettings/FontSettingsWidget.cpp index 5f4898e909..9b07151ba7 100644 --- a/Userland/Applications/DisplaySettings/FontSettingsWidget.cpp +++ b/Userland/Applications/DisplaySettings/FontSettingsWidget.cpp @@ -51,13 +51,13 @@ FontSettingsWidget::~FontSettingsWidget() static void update_label_with_font(GUI::Label& label, Gfx::Font const& font) { - label.set_text(font.qualified_name()); + label.set_text(font.human_readable_name()); label.set_font(font); } void FontSettingsWidget::apply_settings() { - GUI::WindowServerConnection::the().set_system_fonts(m_default_font_label->text(), m_fixed_width_font_label->text()); + GUI::WindowServerConnection::the().set_system_fonts(m_default_font_label->font().qualified_name(), m_fixed_width_font_label->font().qualified_name()); } } |