From 3c73700a91c6dc1561b3b70dcdc0c051d23405d3 Mon Sep 17 00:00:00 2001 From: Tavmjong Bah Date: Mon, 29 Sep 2014 15:57:21 +0200 Subject: Remove NRTypePosDef class and associated cruft. More direct CSS -> Pango translation. (bzr r13569) --- src/sp-text.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'src/sp-text.cpp') diff --git a/src/sp-text.cpp b/src/sp-text.cpp index ccc5adf59..23a3d26cd 100644 --- a/src/sp-text.cpp +++ b/src/sp-text.cpp @@ -30,7 +30,6 @@ #include <2geom/affine.h> #include #include -#include #include #include "svg/svg.h" -- cgit v1.2.3 From e186cf544131e582a43316767257f199e6af986c Mon Sep 17 00:00:00 2001 From: Tavmjong Bah Date: Mon, 29 Sep 2014 16:21:07 +0200 Subject: Remove NRTypePosDef class and associated cruft. More direct CSS -> Pango translation. (bzr r13341.1.233) --- src/sp-text.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'src/sp-text.cpp') diff --git a/src/sp-text.cpp b/src/sp-text.cpp index 3bb1e16d0..5489c68b0 100644 --- a/src/sp-text.cpp +++ b/src/sp-text.cpp @@ -30,7 +30,6 @@ #include <2geom/affine.h> #include #include -#include #include #include "svg/svg.h" -- cgit v1.2.3 From 5f38956decdc5bc4e21a829c70d5fd7cb02a3e99 Mon Sep 17 00:00:00 2001 From: Tavmjong Bah Date: Sun, 5 Oct 2014 11:52:59 +0200 Subject: More direct way of finding font-family in SPText::description. (bzr r13579) --- src/sp-text.cpp | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) (limited to 'src/sp-text.cpp') 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; } -- cgit v1.2.3 From ce6f2248e1c89966448dbff61f4ca92090b6fb3c Mon Sep 17 00:00:00 2001 From: Tavmjong Bah Date: Sun, 5 Oct 2014 12:18:25 +0200 Subject: More direct way of finding font-family in SPText::description. (bzr r13341.1.243) --- src/sp-text.cpp | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'src/sp-text.cpp') diff --git a/src/sp-text.cpp b/src/sp-text.cpp index 5489c68b0..21d6a42f7 100644 --- a/src/sp-text.cpp +++ b/src/sp-text.cpp @@ -358,19 +358,7 @@ const char* SPText::displayName() const { gchar* SPText::description() const { SPStyle *style = this->style; - font_instance *tf = font_factory::Default()->FaceFromStyle(style); - - char *n; - - 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()); -- cgit v1.2.3