diff options
| author | Tavmjong Bah <tavmjong@free.fr> | 2014-10-05 10:18:25 +0000 |
|---|---|---|
| committer | tavmjong-free <tavmjong@free.fr> | 2014-10-05 10:18:25 +0000 |
| commit | ce6f2248e1c89966448dbff61f4ca92090b6fb3c (patch) | |
| tree | d4f685ddad8aff7150c80e25bee9df76c07e5ab3 /src/sp-text.cpp | |
| parent | Fix annoying formatting in sp-guide.cpp (diff) | |
| download | inkscape-ce6f2248e1c89966448dbff61f4ca92090b6fb3c.tar.gz inkscape-ce6f2248e1c89966448dbff61f4ca92090b6fb3c.zip | |
More direct way of finding font-family in SPText::description.
(bzr r13341.1.243)
Diffstat (limited to 'src/sp-text.cpp')
| -rw-r--r-- | src/sp-text.cpp | 14 |
1 files changed, 1 insertions, 13 deletions
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()); |
