Changing Text Values for Multiple Text Objects

Post questions on how to use or achieve an effect in Inkscape.
glitz0980
Posts: 3
Joined: Mon Mar 26, 2012 2:24 am

Changing Text Values for Multiple Text Objects

Postby glitz0980 » Mon Mar 26, 2012 2:42 am

Question: Is there an option to simultaneously change the text values for multiple text objects?

Background: I loose a lot of time during projects trying out different font styles. I ended up making a Inkscape doc containing a text object for each font style. The thought was I could update all the values en masse to see how my text blocks look in different fonts.

I run into my problem when updating all the objects. How can I change the text values for all the objects at once? Thanks!

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Changing Text Values for Multiple Text Objects

Postby brynn » Mon Mar 26, 2012 9:15 am

Image
Welcome to InkscapeForum!

What do you mean by "text values"? Are you talking about using XML? If it's on the canvas, you can simply select all the text at once, then make the changes. But it sounds like you're probably talking about XML, or maybe some kind of script?

User avatar
Maestral
Posts: 982
Joined: Sat Aug 27, 2011 7:10 am

Re: Changing Text Values for Multiple Text Objects

Postby Maestral » Mon Mar 26, 2012 4:51 pm

Perhaps it`s all about font size, spacing among lines or letters... and the rest from :tool_text: toolbar (except for Horizontal kerning, Vertical shift and Character rotation. In order to apply these changes, text has to be selected as an text but not as an object). If so, and if possible, move all text to the separate layer. That way you`ll make selecting of the text much easier and changes in values will be applied to all selected.
:tool_zoom: <<< click! - but, those with a cheaper tickets should go this way >>> :!:

glitz0980
Posts: 3
Joined: Mon Mar 26, 2012 2:24 am

Re: Changing Text Values for Multiple Text Objects

Postby glitz0980 » Tue Mar 27, 2012 12:09 am

By "Text Values" I'm referring to actual text.

For example lets say I have 3 text objects with place holder "Hello World" text written in them. One is in Times New Roman another in Garamond & the last Arial. I want to change all of them to say "Come over to Jone's Big Truck Rental & Storage..." but retain the original font styles.

Any way to do this so I can see how the new text looks in all the different fonts? Thanks!

User avatar
Dillerkind
Posts: 386
Joined: Tue May 10, 2011 10:22 pm
Location: Germany
Contact:

Re: Changing Text Values for Multiple Text Objects

Postby Dillerkind » Wed Mar 28, 2012 9:40 am

Using clones would be cool. Simply edit the original's text and all the clones will update their appearance (read: their text) as well. This works... the problem though is that (if memory serves) you can't give clones different font attributes from what their parent objects have, rendering this attempt mostly useless.

One way to do what you're trying to do is to open the file in a text editor and replace the old text string (replace ALL of them) with whatever new text you want. Save the edited file and reload it in Inkscape. No need to close Inkscape while you're tinkering in the editor. Simply use the File->revert command after you've changed the file in the text editor. I admit that this isn't very elegant (for some reason most of my suggestions tend to be like this :D) but it's relatively quick and unless somebody comes up with a better idea this should work.
... My blog ... << Come visit me :) >> ... My thread ...

glitz0980
Posts: 3
Joined: Mon Mar 26, 2012 2:24 am

Re: Changing Text Values for Multiple Text Objects

Postby glitz0980 » Wed Apr 04, 2012 6:39 am

It works! Thanks Dillerkind!

chriswww
Posts: 383
Joined: Fri Nov 19, 2010 3:04 pm

Re: Changing Text Values for Multiple Text Objects

Postby chriswww » Wed Apr 04, 2012 1:05 pm

i'm probably sticking my neck out a bit...but i think that svg itself would allow you to encapsulate a tspan or whatever object in a group and reference it from several places, and apply different styles to those references. as to actually getting this going i can't help further with actual code, as it would take a bit of time to tinker. then there's still the question of whether Inkscape would properly render this and allow required interaction.
Another way of going about this is to have some reasonably sized blocks of placeholder text (lorem ipsum) in each font, which should allow you to roughly judge how appropriate any block looks to you; without using actual text. With any luck you should be able to change line spacing of all the block samples at the same time, without affecting font. But it probably won't allow you to change font size en masse without affecting font face also. there's some good typography rules of thumb to start with when working with text, that will save you time.
If Inkscape supported defining your own styles, that would be supreme.

Zom-B
Posts: 15
Joined: Tue May 08, 2012 12:06 am

Re: Changing Text Values for Multiple Text Objects

Postby Zom-B » Thu May 31, 2012 12:01 am

Resurrecting an old thread because I have the same issue, however I cannot use a text editor to replace/all text.

I'm making study material for Japanese class, and on every page there are 10 Japanese characters (kanji) to practice, and each character is shown small, large and in two different fonts.

I migrated from M$ Visio, where I could just select the objects, press paste, and the text inside all objects would be replaced.

I need this because I'm making a lot of these sheets, and I do this by duplicating a sheet and then copy/pasting the characters from a text editor into the design, 10 times.

ofnuts
Posts: 15
Joined: Mon May 07, 2012 6:49 am
Location: Lost in my thoughts

Re: Changing Text Values for Multiple Text Objects

Postby ofnuts » Thu May 31, 2012 2:43 am

Zom-B wrote:Resurrecting an old thread because I have the same issue, however I cannot use a text editor to replace/all text.
>Why so? Maybe your text editor (Notepad?) doesn't support Kanji characters, but there are (free) others that do (Notepad++, for Windows, AFAIK: http://notepad-plus-plus.org/). The rest is a matter of cut and paste.


Return to “Help with using Inkscape”