Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Link text boxes together
#1
How would you be able to change one text box and it change multiple other text boxes on the same layer or different layers? Ideally linking multiple text boxes together. 

Use case: I have a letter that sits on 12 places on an image. Every day I need to change that letter, instead of changing 12 different text boxes, could I just change one and it auto edit the rest?

Thanks,
Jake
Reply
#2
As far as I know what you describe is not possible, Changes in one text layer reflected in another text layer.

I can think of one work-around, an overlay and an old script that places characters on a path. Very limited if you have to consider character spacing, font, colour, ....etc : example https://i.imgur.com/eePZaT5.mp4

Give more details of your requirements and someone might have a solution.
Reply
#3
Hi Jake. I have to agree with rich2005.
I suppose you could place that as a suggestion for the development community.
Basically, an instance of the textbox has to exist which can be duplicated. Changing the one instance is replicated to all duplicates.
For now, I doubt is possible.

kkt
Reply
#4
(07-02-2022, 03:53 PM)jake51188 Wrote: How would you be able to change one text box and it change multiple other text boxes on the same layer or different layers? Ideally linking multiple text boxes together. 

Use case: I have a letter that sits on 12 places on an image. Every day I need to change that letter, instead of changing 12 different text boxes, could I just change one and it auto edit the rest?

Thanks,
Jake

Assuming that you just want to change one particular character for another single character I can think of two ways.

The first, and neater, of the two methods would be to write a (fairly) simple script (ideally in Python). This would accept the new character (as a one character string) and then use the gimp-image-get-layer-by-name function once for each of the text layers and then use the gimp-text-layer-get-text and gimp-text-layer-set-text functions to set the updated text for that layer.

The second, not recommended, method would be to write a program that would open the GIMP xcf file in binary mode and scan through it searching for and then changing the text strings before saving the file (or a copy of it)

Neither method is a particularly easy solution for GIMP. I don't know much about imagemagick but perhaps you could use that to add the relevant text to a base image produced by GIMP. On balance, if it was something I had to do each day, I would go for the first option noted above and write a script.
Reply


Forum Jump: