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.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/sp-text.cpp b/src/sp-text.cpp
index 8d42b7d59..2e2bf15bc 100644
--- a/src/sp-text.cpp
+++ b/src/sp-text.cpp
@@ -43,7 +43,6 @@
#include "sp-namedview.h"
#include "style.h"
#include "inkscape.h"
-#include "sp-metrics.h"
#include "xml/quote.h"
#include "xml/repr.h"
#include "mod360.h"
@@ -56,7 +55,6 @@
#include "sp-tspan.h"
#include "text-editing.h"
-#include "unit-constants.h"
/*#####################################################
# SPTEXT
@@ -381,9 +379,9 @@ static char * sp_text_description(SPItem *item)
font_instance *tf = font_factory::Default()->FaceFromStyle(style);
- char name_buf[256];
char *n;
if (tf) {
+ char name_buf[256];
tf->Family(name_buf, sizeof(name_buf));
n = xml_quote_strdup(name_buf);
tf->Unref();
@@ -392,7 +390,8 @@ static char * sp_text_description(SPItem *item)
n = g_strdup(_("<no name found>"));
}
- GString *xs = SP_PX_TO_METRIC_STRING(style->font_size.computed, sp_desktop_namedview(SP_ACTIVE_DESKTOP)->getDefaultMetric());
+ Inkscape::Util::Quantity q = Inkscape::Util::Quantity(style->font_size.computed, "px");
+ GString *xs = g_string_new(q.string(*sp_desktop_namedview(SP_ACTIVE_DESKTOP)->doc_units).c_str());
char const *trunc = "";
Inkscape::Text::Layout const *layout = te_get_layout((SPItem *) item);