From e393169c252e4e9fb87b87ffc1d32671e3d5c3f2 Mon Sep 17 00:00:00 2001 From: Tavmjong Bah Date: Sun, 29 Apr 2018 18:49:03 +0200 Subject: Bug fixes for variable fonts, especially to support the Decovar font. --- src/ui/widget/font-selector.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/ui/widget/font-selector.cpp') diff --git a/src/ui/widget/font-selector.cpp b/src/ui/widget/font-selector.cpp index 69777f528..ae2707353 100644 --- a/src/ui/widget/font-selector.cpp +++ b/src/ui/widget/font-selector.cpp @@ -244,7 +244,12 @@ FontSelector::get_fontspec() { Glib::ustring variations = font_variations.get_pango_string(); - Glib::ustring fontspec = family + ", " + style + " " + variations; + Glib::ustring fontspec = family + " "; + if (variations.empty()) { + fontspec += style; + } else { + fontspec += variations; + } return fontspec; } @@ -262,7 +267,7 @@ FontSelector::style_cell_data_func (Gtk::CellRenderer *renderer, Gtk::TreeIter c (*iter).get_value(1, style); Glib::ustring style_escaped = Glib::strescape( style ); - Glib::ustring font_desc = family + ", " + style; + Glib::ustring font_desc = family + " " + style; Glib::ustring markup; markup = "" + style_escaped + ""; -- cgit v1.2.3