diff options
| author | Tavmjong Bah <tavmjong@free.fr> | 2015-10-02 08:59:31 +0000 |
|---|---|---|
| committer | tavmjong-free <tavmjong@free.fr> | 2015-10-02 08:59:31 +0000 |
| commit | 10a193ebe2e0343bafe71e4a78603335ff1a70fb (patch) | |
| tree | 727dfe72fbaf56e0541ac151f082244008e47d8a /src/path-chemistry.cpp | |
| parent | Change command line PostScript export level to 3 (bug #1432310) (diff) | |
| download | inkscape-10a193ebe2e0343bafe71e4a78603335ff1a70fb.tar.gz inkscape-10a193ebe2e0343bafe71e4a78603335ff1a70fb.zip | |
Use different method to find text to save when converting text to path.
(Also has advantage of preserving lines.)
Fixed bugs:
- https://launchpad.net/bugs/1502013
(bzr r14390)
Diffstat (limited to 'src/path-chemistry.cpp')
| -rw-r--r-- | src/path-chemistry.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/path-chemistry.cpp b/src/path-chemistry.cpp index 7bd5b6298..c71465782 100644 --- a/src/path-chemistry.cpp +++ b/src/path-chemistry.cpp @@ -474,7 +474,13 @@ sp_selected_item_to_curved_repr(SPItem *item, guint32 /*text_grouping_policy*/) // Special treatment for text: convert each glyph to separate path, then group the paths Inkscape::XML::Node *g_repr = xml_doc->createElement("svg:g"); - Glib::ustring original_text; // To save original text of accessibility. + // Save original text for accessibility. + Glib::ustring original_text = sp_te_get_string_multiline( item, + te_get_layout(item)->begin(), + te_get_layout(item)->end() ); + if( original_text.size() > 0 ) { + g_repr->setAttribute("aria-label", original_text.c_str() ); + } g_repr->setAttribute("transform", item->getRepr()->attribute("transform")); /* Mask */ @@ -494,10 +500,8 @@ sp_selected_item_to_curved_repr(SPItem *item, guint32 /*text_grouping_policy*/) item->style->write( SP_STYLE_FLAG_IFDIFF, item->parent ? item->parent->style : NULL); // TODO investigate posibility g_repr->setAttribute("style", style_str.c_str()); - Inkscape::Text::Layout::iterator iter = te_get_layout(item)->begin(); + Inkscape::Text::Layout::iterator iter = te_get_layout(item)->begin(); do { - original_text += (gunichar)te_get_layout(item)->characterAt( iter ); - Inkscape::Text::Layout::iterator iter_next = iter; iter_next.nextGlyph(); // iter_next is one glyph ahead from iter if (iter == iter_next) @@ -538,10 +542,6 @@ sp_selected_item_to_curved_repr(SPItem *item, guint32 /*text_grouping_policy*/) g_repr->appendChild(p_repr); - // For accessibility, store original string - if( original_text.size() > 0 ) { - g_repr->setAttribute("aria-label", original_text.c_str() ); - } Inkscape::GC::release(p_repr); if (iter == te_get_layout(item)->end()) |
