Find name of fonts used within Gimp xcf file

From a linux console

grep -aPo 'font "(.*?)"' file.xcf

Sample output:

$ grep -aPo 'font "(.*?)"' file.xcf 
font "HP Simplified Italic"
font "Freehand521 BT"
font "Freehand521 BT"

Also you can look at the xcf with nano:

nano file.xcf

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.