diff options
| author | su_v <suv-sf@users.sourceforge.net> | 2013-08-29 21:06:10 +0000 |
|---|---|---|
| committer | ~suv <suv-sf@users.sourceforge.net> | 2013-08-29 21:06:10 +0000 |
| commit | 4d331e73a76dce7d703716093923ca01b3cc5936 (patch) | |
| tree | b444657ba269b25f60684e66858a138b74fe240d /src/sp-text.cpp | |
| parent | Fix compiler warnings (diff) | |
| parent | Updating outdated test. Fixes bug #1202271. (diff) | |
| download | inkscape-4d331e73a76dce7d703716093923ca01b3cc5936.tar.gz inkscape-4d331e73a76dce7d703716093923ca01b3cc5936.zip | |
merge from trunk (r12487)
(bzr r11668.1.75)
Diffstat (limited to 'src/sp-text.cpp')
| -rw-r--r-- | src/sp-text.cpp | 7 |
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); |
