This post has been archived and may contain out of date, or no longer relevant, information.

Have you ever opened up an XCF in GIMP to find that the original font used was missing? As far as I can tell GIMP doesn’t give any indication as to the font name. The font name itself is stored inside the XCF file as plain text though so you can open the XCF and find it.

Text Editor / Hex Editor

An easy, but not very elegant, method is to open up the file in a text editor (such as Kate or Notepad++) or a hex editor. From there you can shift through and do a search for 'font'.

Terminal

There are plenty of ways to do this via a terminal but this is probably the easiest:

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

To find fonts in multiple XCF files just add a wildcard:

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

Of course you can get creative and recursively search inside a directory, return only unique matches etc:

grep -aPor -m 1 'font "(.*?)"' *.xcf

All three commands will output the actual font names and the file they are in.

If anyone knows a more elegant method that can be done inside GIMP itself feel free to share in the comments below (although personally the terminal method works fine for me and likely much more flexible).