Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Batch Changing font style
#1
Hello!
I have managed to put together a Gimp plugin (attached) to change font styles
a. the font itself
b. increase/decrease: font size, letter spacing and line height (separately)
c. the font color to foreground color
to apply inside: active group, active group & subgroups, or whole image.

I find it especially useful for treatment of files with a lot of text layers (maps, diagrams)  after scaling the whole image. With a hitch: the plugin works only on text layers, and that property disappears on scaling, to be restored only by clicking on the layer with the text tool and accepting 'edit'--somewhat uphill when you have 20+ text layers.
Now, my question is: can there be some way to restore the text to editable from a plugin? (It will be on the wrong font size and requiring further adjustments, but one can always work on a copy.)
After much digging, I have found that those former text layers return on
Code:
pdb.gimp_item_get_parasite_list()

a 'tuple' containig "gimp-text-layer" (so, one can pick them out from the other layers), but I haven't found any way to restore them. Something like 'open as text layer' (with options) must exist in the Gimp internals...
So, please: any ideas?
Thanks!


Attached Files
.zip   group_stylefont_V3.zip (Size: 1.83 KB / Downloads: 322)
Reply


Messages In This Thread
Batch Changing font style - by carmen - 10-14-2019, 01:54 AM
RE: Batch Changing font style - by Ofnuts - 10-14-2019, 06:47 AM
RE: Batch Changing font style - by carmen - 10-14-2019, 10:41 AM
RE: Batch Changing font style - by Ofnuts - 10-14-2019, 12:32 PM
RE: Batch Changing font style - by carmen - 10-14-2019, 03:47 PM

Forum Jump: