summaryrefslogtreecommitdiffstats
path: root/src/ui/widget/font-selector.cpp
diff options
context:
space:
mode:
authorTavmjong Bah <tavmjong@free.fr>2018-04-29 16:49:03 +0000
committerTavmjong Bah <tavmjong@free.fr>2018-04-29 16:49:03 +0000
commite393169c252e4e9fb87b87ffc1d32671e3d5c3f2 (patch)
tree82dd36438ba161dae60dd041637150f9c7942c33 /src/ui/widget/font-selector.cpp
parentUpdate style.css to improve margin and padding in #InkSpinScale (diff)
downloadinkscape-e393169c252e4e9fb87b87ffc1d32671e3d5c3f2.tar.gz
inkscape-e393169c252e4e9fb87b87ffc1d32671e3d5c3f2.zip
Bug fixes for variable fonts, especially to support the Decovar font.
Diffstat (limited to 'src/ui/widget/font-selector.cpp')
-rw-r--r--src/ui/widget/font-selector.cpp9
1 files changed, 7 insertions, 2 deletions
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 = "<span font='" + font_desc + "'>" + style_escaped + "</span>";