diff options
| author | Tavmjong Bah <tavmjong@free.fr> | 2014-05-15 14:13:07 +0000 |
|---|---|---|
| committer | tavmjong-free <tavmjong@free.fr> | 2014-05-15 14:13:07 +0000 |
| commit | 779a151867babce787dbd06ff1e40d54d3b9443d (patch) | |
| tree | b7f7d928c44e8b277ea1a2bfebddd435353403ba /src/ui/dialog/text-edit.cpp | |
| parent | Style rewrite: Unquote strings from libcroco. Fixes 1303422. (diff) | |
| download | inkscape-779a151867babce787dbd06ff1e40d54d3b9443d.tar.gz inkscape-779a151867babce787dbd06ff1e40d54d3b9443d.zip | |
Fix Pango markup used in Text and Font dialog.
(bzr r13378)
Diffstat (limited to 'src/ui/dialog/text-edit.cpp')
| -rw-r--r-- | src/ui/dialog/text-edit.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ui/dialog/text-edit.cpp b/src/ui/dialog/text-edit.cpp index 17c29c69f..c1ebb32e0 100644 --- a/src/ui/dialog/text-edit.cpp +++ b/src/ui/dialog/text-edit.cpp @@ -404,12 +404,12 @@ void TextEdit::setPreviewText (Glib::ustring font_spec, Glib::ustring phrase) double pt_size = Inkscape::Util::Quantity::convert(sp_style_css_size_units_to_px(sp_font_selector_get_size(fsel), unit), "px", "pt"); // Pango font size is in 1024ths of a point - // C++11: Glib::ustring size = std::to_string( pt_size * PANGO_SCALE ); + // C++11: Glib::ustring size = std::to_string( int(pt_size * PANGO_SCALE) ); std::ostringstream size_st; - size_st << pt_size * PANGO_SCALE; + size_st << int(pt_size * PANGO_SCALE); // Markup code expects integers - Glib::ustring markup = "<span font=\"" + font_spec + - "\" size=\"" + size_st.str() + "\">" + phrase_escaped + "</span>"; + Glib::ustring markup = "<span font=\'" + font_spec + + "\' size=\'" + size_st.str() + "\'>" + phrase_escaped + "</span>"; preview_label.set_markup(markup.c_str()); } |
