I have a simple python-fu script for gimp
list_of_text = [
"long string one",
"long string two ",
]
x=200
y=400
border=0
font_size=62
font="Merriweather"
path='/Users/incognito/blank_card.xcf'
for text in list_of_text:
image = pdb.gimp_file_load(path, '1')
gimp.Display(image)
gimp.set_foreground(23, 18, 20)
layer = pdb.gimp_text_fontname(image, None, x, y, text, border, True, font_size, PIXELS, font)
Everything works there.
The issue is I can't find any way in the API to resize the text box. As you can see in this image the length of the text is so long that I can't even get access to the handles to resize the box.
I've tried a few things like using the layer resize api but this seems to only anchor the image somehow. I've also tried creating layers that have limited sizes but the new text seems to ignore it.
I've been reading through the docs here but it isn't very obvious to me. https://developer.gimp.org/api/2.0/libgimp/libgimp-gimptextlayer.html