diff options
| author | Marc Jeanmougin <marc@jeanmougin.fr> | 2018-06-14 18:14:25 +0000 |
|---|---|---|
| committer | Marc Jeanmougin <marc@jeanmougin.fr> | 2018-06-14 18:14:25 +0000 |
| commit | d5cfc65fc0aae159982e5da8965b85bfd6eb9d66 (patch) | |
| tree | f983fc91a1db5eb8d05a9959c8aae40df4688150 /src | |
| parent | Merge branch 'undefined' of gitlab.com:sileGit/inkscape (diff) | |
| parent | Fix three more instances of incorrectly escaped markup (diff) | |
| download | inkscape-d5cfc65fc0aae159982e5da8965b85bfd6eb9d66.tar.gz inkscape-d5cfc65fc0aae159982e5da8965b85bfd6eb9d66.zip | |
Merge branch 'fontmarkup' of gitlab.com:darktrojan/inkscape
Diffstat (limited to 'src')
| -rw-r--r-- | src/libnrtype/font-lister.cpp | 9 | ||||
| -rw-r--r-- | src/ui/widget/font-selector.cpp | 5 |
2 files changed, 8 insertions, 6 deletions
diff --git a/src/libnrtype/font-lister.cpp b/src/libnrtype/font-lister.cpp index 47a260714..0c0c1c29c 100644 --- a/src/libnrtype/font-lister.cpp +++ b/src/libnrtype/font-lister.cpp @@ -2,6 +2,7 @@ #include <config.h> #endif +#include <glibmm/markup.h> #include <glibmm/regex.h> #include <gtkmm/cellrenderertext.h> @@ -149,7 +150,7 @@ Glib::ustring FontLister::get_font_family_markup(Gtk::TreeIter const &iter) Glib::ustring family = row[FontList.family]; bool onSystem = row[FontList.onSystem]; - Glib::ustring family_escaped = Glib::strescape( family ); + Glib::ustring family_escaped = Glib::Markup::escape_text( family ); Glib::ustring markup; if (!onSystem) { @@ -172,11 +173,11 @@ Glib::ustring FontLister::get_font_family_markup(Gtk::TreeIter const &iter) } if (found) { - markup += Glib::strescape (token); + markup += Glib::Markup::escape_text (token); markup += ", "; } else { markup += "<span strikethrough=\"true\" strikethrough_color=\"red\">"; - markup += Glib::strescape (token); + markup += Glib::Markup::escape_text (token); markup += "</span>"; markup += ", "; } @@ -1189,7 +1190,7 @@ void font_lister_style_cell_data_func (Gtk::CellRenderer *renderer, Gtk::TreeIte Glib::ustring family = font_lister->get_font_family(); Glib::ustring style = row[font_lister->FontStyleList.cssStyle]; - Glib::ustring style_escaped = Glib::strescape( style ); + Glib::ustring style_escaped = Glib::Markup::escape_text( style ); Glib::ustring font_desc = family + ", " + style; Glib::ustring markup; diff --git a/src/ui/widget/font-selector.cpp b/src/ui/widget/font-selector.cpp index 70f7d55db..59b7311c2 100644 --- a/src/ui/widget/font-selector.cpp +++ b/src/ui/widget/font-selector.cpp @@ -12,6 +12,7 @@ #endif #include <glibmm/i18n.h> +#include <glibmm/markup.h> #include "font-selector.h" @@ -268,8 +269,8 @@ FontSelector::style_cell_data_func (Gtk::CellRenderer *renderer, Gtk::TreeIter c Glib::ustring style = "Normal"; (*iter).get_value(1, style); - Glib::ustring style_escaped = Glib::strescape( style ); - Glib::ustring font_desc = family + " " + style; + Glib::ustring style_escaped = Glib::Markup::escape_text( style ); + Glib::ustring font_desc = Glib::Markup::escape_text( family + " " + style ); Glib::ustring markup; markup = "<span font='" + font_desc + "'>" + style_escaped + "</span>"; |
