summaryrefslogtreecommitdiffstats
path: root/src/sp-text.cpp
diff options
context:
space:
mode:
authorTavmjong Bah <tavmjong@free.fr>2016-02-20 12:06:07 +0000
committertavmjong-free <tavmjong@free.fr>2016-02-20 12:06:07 +0000
commit212bb7b04ce7443e2070fb71e738abdffe738bd8 (patch)
treeb3f0680bab1d90e4099fcd6f255d4a4b4ab6d259 /src/sp-text.cpp
parentClarify meaning of line spacing. (diff)
downloadinkscape-212bb7b04ce7443e2070fb71e738abdffe738bd8.tar.gz
inkscape-212bb7b04ce7443e2070fb71e738abdffe738bd8.zip
Font size in status bar should use unit from text units preference. Patch from Tobias Ellinghaus.
(bzr r14662)
Diffstat (limited to 'src/sp-text.cpp')
-rw-r--r--src/sp-text.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/sp-text.cpp b/src/sp-text.cpp
index c7dfdd694..afbe0b147 100644
--- a/src/sp-text.cpp
+++ b/src/sp-text.cpp
@@ -367,8 +367,11 @@ gchar* SPText::description() const {
char *n = xml_quote_strdup( style->font_family.value );
+ Inkscape::Preferences *prefs = Inkscape::Preferences::get();
+ int unit = prefs->getInt("/options/font/unitType", SP_CSS_UNIT_PT);
Inkscape::Util::Quantity q = Inkscape::Util::Quantity(style->font_size.computed, "px");
- GString *xs = g_string_new(q.string(SP_ACTIVE_DESKTOP->getNamedView()->display_units).c_str());
+ q.quantity *= this->i2doc_affine().descrim();
+ GString *xs = g_string_new(q.string(sp_style_get_css_unit_string(unit)).c_str());
char const *trunc = "";
Inkscape::Text::Layout const *layout = te_get_layout((SPItem *) this);