diff options
| author | Marc Jeanmougin <marc@jeanmougin.fr> | 2018-01-11 08:05:35 +0000 |
|---|---|---|
| committer | Marc Jeanmougin <marc@jeanmougin.fr> | 2018-01-11 08:05:35 +0000 |
| commit | 8cbe806d6ae4b35e258402cab5295cdb0bd6de47 (patch) | |
| tree | 6b2ddd9e7f067778c5309f507a0d54b5f09f584d /src/ui/dialog/text-edit.cpp | |
| parent | Merge branch 'compile-with-gold' of gitlab.com:houz/inkscape (diff) | |
| parent | Don't double-escape names of used fonts (diff) | |
| download | inkscape-8cbe806d6ae4b35e258402cab5295cdb0bd6de47.tar.gz inkscape-8cbe806d6ae4b35e258402cab5295cdb0bd6de47.zip | |
Merge branch 'escapefontspec' of gitlab.com:darktrojan/inkscape
Diffstat (limited to 'src/ui/dialog/text-edit.cpp')
| -rw-r--r-- | src/ui/dialog/text-edit.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ui/dialog/text-edit.cpp b/src/ui/dialog/text-edit.cpp index 33c173a1c..078c7603c 100644 --- a/src/ui/dialog/text-edit.cpp +++ b/src/ui/dialog/text-edit.cpp @@ -367,6 +367,7 @@ void TextEdit::setPreviewText (Glib::ustring font_spec, Glib::ustring phrase) return; } + Glib::ustring font_spec_escaped = Glib::Markup::escape_text( font_spec ); Glib::ustring phrase_escaped = Glib::Markup::escape_text( phrase ); Inkscape::Preferences *prefs = Inkscape::Preferences::get(); @@ -379,7 +380,7 @@ void TextEdit::setPreviewText (Glib::ustring font_spec, Glib::ustring phrase) std::ostringstream size_st; size_st << int(pt_size * PANGO_SCALE); // Markup code expects integers - Glib::ustring markup = "<span font=\'" + font_spec + + Glib::ustring markup = "<span font=\'" + font_spec_escaped + "\' size=\'" + size_st.str() + "\'>" + phrase_escaped + "</span>"; preview_label.set_markup(markup.c_str()); |
