diff options
| author | Liam P. White <inkscapebrony@gmail.com> | 2014-10-08 02:22:03 +0000 |
|---|---|---|
| committer | Liam P. White <inkscapebrony@gmail.com> | 2014-10-08 02:22:03 +0000 |
| commit | f3840fe9d0d423f6ddf5a68d776a903d57ffb7b5 (patch) | |
| tree | c8e28b27f5885928ccf866a69eb6cbc99fde599c /src/sp-text.cpp | |
| parent | Update to experimental r13565 (diff) | |
| parent | Some template cleanup... (diff) | |
| download | inkscape-f3840fe9d0d423f6ddf5a68d776a903d57ffb7b5.tar.gz inkscape-f3840fe9d0d423f6ddf5a68d776a903d57ffb7b5.zip | |
Update to experimental r13598
(bzr r13341.5.17)
Diffstat (limited to 'src/sp-text.cpp')
| -rw-r--r-- | src/sp-text.cpp | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/src/sp-text.cpp b/src/sp-text.cpp index 3bb1e16d0..93d81e47b 100644 --- a/src/sp-text.cpp +++ b/src/sp-text.cpp @@ -30,7 +30,6 @@ #include <2geom/affine.h> #include <libnrtype/FontFactory.h> #include <libnrtype/font-instance.h> -#include <libnrtype/font-style-to-pos.h> #include <glibmm/i18n.h> #include "svg/svg.h" @@ -357,21 +356,10 @@ const char* SPText::displayName() const { } gchar* SPText::description() const { - SPStyle *style = this->style; - - font_instance *tf = font_factory::Default()->FaceFromStyle(style); - char *n; + SPStyle *style = this->style; - if (tf) { - char name_buf[256]; - tf->Family(name_buf, sizeof(name_buf)); - n = xml_quote_strdup(name_buf); - tf->Unref(); - } else { - /* TRANSLATORS: For description of font with no name. */ - n = g_strdup(_("<no name found>")); - } + char *n = xml_quote_strdup( style->font_family.value ); 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()); @@ -384,9 +372,8 @@ gchar* SPText::description() const { } char *ret = ( SP_IS_TEXT_TEXTPATH(this) - ? g_strdup_printf(_("on path%s (%s, %s)"), trunc, n, xs->str) - : g_strdup_printf(_("%s (%s, %s)"), trunc, n, xs->str) ); - g_free(n); + ? g_strdup_printf(_("on path%s (%s, %s)"), trunc, n, xs->str) + : g_strdup_printf(_("%s (%s, %s)"), trunc, n, xs->str) ); return ret; } |
