summaryrefslogtreecommitdiffstats
path: root/src/sp-text.cpp
diff options
context:
space:
mode:
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);