Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is there a way to find name of fonts used within Gimp .xcf file?

share|improve this question
    
Found out how... open it with something like scite or notepad++... Will answer my question in seven hours... –  jaksco Jun 18 '11 at 17:26
add comment

1 Answer

up vote 5 down vote accepted

Apart from opening the file in a text editor, I found another way to do so from within GIMP, mentioned in a German GIMP forum.

This is a Python script that can be executed from the GIMP's built-in Python console:

>>> for image in gimp.image_list():
...   for layer in image.layers:
...     try:
...       layer.parasite_find('gimp-text-layer').data
...     except AttributeError:
...       pass
...

It runs across all images loaded, across all layers, and dumps the data of all text layers, including font names.

share|improve this answer
    
I'd never used the gimp python console (or much python at all) before so I had to figure this out...I had to indent by four spaces per indentation stop or I got a syntax error. –  Matthew Aug 8 '12 at 16:55
    
Same. I copypasta'd into text editor, removed dots (...) from each line, copypasta'd into GIMP > Filters > Python-Fu -> Console then hit enter two or three times to make it work. Success! –  sudopeople May 8 at 23:50
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.