Lines Matching defs:text
33 #include "text-editing.h"
34 #include "text-chemistry.h"
85 SPItem *text = text_or_flowtext_in_selection(selection);
90 if (!text || !shape || selection->itemList().size() != 2) {
91 desktop->getMessageStack()->flash(Inkscape::WARNING_MESSAGE, _("Select <b>a text and a path</b> to put text on path."));
95 if (SP_IS_TEXT_TEXTPATH(text)) {
96 desktop->getMessageStack()->flash(Inkscape::ERROR_MESSAGE, _("This text object is <b>already put on a path</b>. Remove it from the path first. Use <b>Shift+D</b> to look up its path."));
101 // rect is the only SPShape which is not <path> yet, and thus SVG forbids us from putting text on it
102 desktop->getMessageStack()->flash(Inkscape::ERROR_MESSAGE, _("You cannot put text on a rectangle in this version. Convert rectangle to path first."));
106 // if a flowed text is selected, convert it to a regular text object
107 if (SP_IS_FLOWTEXT(text)) {
109 if (!SP_FLOWTEXT(text)->layout.outputExists()) {
112 _("The flowed text(s) must be <b>visible</b> in order to be put on a path."));
115 Inkscape::XML::Node *repr = SP_FLOWTEXT(text)->getAsText();
119 Inkscape::XML::Node *parent = text->getRepr()->parent();
123 new_item->doWriteTransform(repr, text->transform);
127 text->deleteObject(); // delete the orignal flowtext
133 text = new_item; // point to the new text
136 Inkscape::Text::Layout const *layout = te_get_layout(text);
139 // remove transform from text, but recursively scale text's fontsize by the expansion
140 SP_TEXT(text)->_adjustFontsizeRecursive (text, text->transform.descrim());
141 text->getRepr()->setAttribute("transform", NULL);
143 // make a list of text children
145 for (SPObject *o = text->children; o != NULL; o = o->next) {
149 // create textPath and put it into the text
160 text->getRepr()->addChild(textpath, NULL);
163 // Make a copy of each text child
171 // remove the old repr from under text
172 text->getRepr()->removeChild(reinterpret_cast<Inkscape::XML::Node *>(i->data));
178 text->getRepr()->setAttribute("x", NULL);
179 text->getRepr()->setAttribute("y", NULL);
182 _("Put text on path"));
194 desktop->getMessageStack()->flash(Inkscape::WARNING_MESSAGE, _("Select <b>a text on path</b> to remove it from path."));
216 _("Remove text from path"));
248 //FIXME: must work with text selection
257 desktop->getMessageStack()->flash(Inkscape::WARNING_MESSAGE, _("Select <b>text(s)</b> to remove kerns from."));
277 desktop->getMessageStack()->flash(Inkscape::ERROR_MESSAGE, _("Select <b>text(s)</b> to remove kerns from."));
296 SPItem *text = text_or_flowtext_in_selection(selection);
299 if (!text || !shape || selection->itemList().size() < 2) {
300 desktop->getMessageStack()->flash(Inkscape::WARNING_MESSAGE, _("Select <b>a text</b> and one or more <b>paths or shapes</b> to flow text into frame."));
304 if (SP_IS_TEXT(text)) {
305 // remove transform from text, but recursively scale text's fontsize by the expansion
306 SP_TEXT(text)->_adjustFontsizeRecursive(text, text->transform.descrim());
307 text->getRepr()->setAttribute("transform", NULL);
311 root_repr->setAttribute("xml:space", "preserve"); // we preserve spaces in the text objects we create
312 root_repr->setAttribute("style", text->getRepr()->attribute("style")); // fixme: transfer style attrs too
339 if (SP_IS_TEXT(text)) { // flow from text, as string
345 Inkscape::Text::Layout const *layout = te_get_layout(text);
346 Glib::ustring text_ustring = sp_te_get_string_multiline(text, layout->begin(), layout->end());
354 } else { // reflow an already flowed text, preserving paras
355 for (SPObject *o = text->children; o != NULL; o = o->next) {
366 text->deleteObject(true);
369 _("Flow text into shape"));
391 desktop->getMessageStack()->flash(Inkscape::WARNING_MESSAGE, _("Select <b>a flowed text</b> to unflow it."));
415 /* Create <text> */
416 Inkscape::XML::Node *rtext = xml_doc->createElement("svg:text");
417 rtext->setAttribute("xml:space", "preserve"); // we preserve spaces in the text objects we create
443 SPText *text = SP_TEXT(text_object);
444 text->_adjustFontsizeRecursive(text, ex);
464 _("Unflow flowed text"));
476 _("Select <b>flowed text(s)</b> to convert."));
494 _("The flowed text(s) must be <b>visible</b> in order to be converted."));
521 _("Convert flowed text to text"));
526 _("<b>No flowed text(s)</b> to convert in the selection."));