Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Batch Changing font style
#4
In my own text-info script:

Code:
def text_info(img,layer):
    parasites=None
    try:
        parasites=layer.parasite_list()
    except Exception as e:
        pass;
    if parasites and 'gimp-text-layer' in parasites:
        data=layer.parasite_find('gimp-text-layer').data
        pdb.gimp_message('Text layer "%s": %s' % (layer.name,data))
    else:
        pdb.gimp_message('No text information found for layer "%s"' % layer.name)
With the caveat that the parasite doesn't exist until you save the file (so you won't find it on a freshly created text layer).
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: