- Change dashes to underscores
- Change -1 to None
- Skip run-mode
layer = pdb.gimp_text_fontname(img, None, 0, 0, initstr, 10, True, size, PIXELS, font)
layer = pdb.gimp_text_fontname(img, None, 0, 0, initstr, 10, True, size, PIXELS, font)
This function doesn't have it, but a lot of PDB functions -- especially when you're calling plug-ins written in script-fu -- will have a run-mode argument for whether they should pop up a dialog or not.
Skip it. Python handles that for you.
There might be other gotchas too. These are all the ones I've hit myself.