10-14-2019, 01:54 AM
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
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!
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!