summaryrefslogtreecommitdiffstats
path: root/src/sp-text.cpp
diff options
context:
space:
mode:
authorMarkus Engel <markus.engel@tum.de>2013-08-30 21:35:42 +0000
committerMarkus Engel <markus.engel@tum.de>2013-08-30 21:35:42 +0000
commit8756c49b91fd4262b6770ac3b2f229209bdae96b (patch)
tree67ac89d7bc7c69e04e811324734dccafc07f33c9 /src/sp-text.cpp
parentMerged from trunk (r12465). (diff)
parentMerge emf/wmf work (diff)
downloadinkscape-8756c49b91fd4262b6770ac3b2f229209bdae96b.tar.gz
inkscape-8756c49b91fd4262b6770ac3b2f229209bdae96b.zip
Merged from trunk (r12488).
(bzr r11608.1.120)
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 3771238e0..85137e58d 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"
#include "sp-factory.h"
@@ -329,10 +327,10 @@ gchar* SPText::description() {
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();
@@ -341,7 +339,8 @@ gchar* SPText::description() {
n = g_strdup(_("&lt;no name found&gt;"));
}
- 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 *) this);