diff options
| author | su_v <suv-sf@users.sourceforge.net> | 2014-10-06 00:26:31 +0000 |
|---|---|---|
| committer | ~suv <suv-sf@users.sourceforge.net> | 2014-10-06 00:26:31 +0000 |
| commit | dfb265dde638a1c87332f675afb9a2910487153f (patch) | |
| tree | 2138d1744b3cdd187315ab2ea9e01d39954c94c2 /src/sp-text.cpp | |
| parent | update to trunk (r13577) (diff) | |
| parent | Remove unused functions. (diff) | |
| download | inkscape-dfb265dde638a1c87332f675afb9a2910487153f.tar.gz inkscape-dfb265dde638a1c87332f675afb9a2910487153f.zip | |
update to trunk (r13580)
(bzr r13506.1.109)
Diffstat (limited to 'src/sp-text.cpp')
| -rw-r--r-- | src/sp-text.cpp | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/src/sp-text.cpp b/src/sp-text.cpp index 23a3d26cd..616a1b753 100644 --- a/src/sp-text.cpp +++ b/src/sp-text.cpp @@ -326,21 +326,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()); @@ -353,9 +342,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; } |
