Fix GIMP Freezing on Font Indexing at Startup

When launched, the GNU Image Manipulation Program (GIMP) scans and indexes every font registered in the operating system and configured directories. For users with large typography collections, this indexing phase frequently results in prolonged startup freezes, unresponsive application states, or complete crashes. This article outlines the specific Fontconfig system configurations and directory management adjustments required to stop GIMP from hanging during font initialization.

Understanding the Bottleneck: Fontconfig

GIMP relies on a library called Fontconfig to manage, discover, and render fonts across platforms. During startup, GIMP requests a refreshed list of available fonts. If the system's Fontconfig cache is missing, corrupted, or forced to re-parse thousands of individual .ttf and .otf files simultaneously, GIMP stops responding until the file input/output process finishes.

Applying the following system and application configurations prevents this behavior.


1. Pre-Building the System Font Cache

Rather than allowing GIMP to trigger a live rebuild of the font database during launch, you can generate a persistent binary font cache directly through the operating system.

On Linux:

Run the terminal command to regenerate the system-wide font cache:

fc-cache -f -v
  • -f forces a regeneration of all caches, replacing corrupted index files.
  • -v displays verbose output so you can monitor progress and identify slow or hanging directories.

Once completed, GIMP reads the pre-compiled binary cache directly upon startup rather than indexing raw font files.

On Windows:

If Fontconfig binaries are accessible in your path or within the GIMP installation directory (typically located at C:\Program Files\GIMP 2\bin\fc-cache.exe), open Command Prompt as an administrator and run:

"C:\Program Files\GIMP 2\bin\fc-cache.exe" -f -v

2. Disabling System Font Path Traversal in GIMP Preferences

The most effective configuration to prevent startup freezes without touching system-level caches is restricting GIMP from scanning the OS-level font repository (such as C:\Windows\Fonts or /usr/share/fonts).

  1. Open GIMP (wait for the initial freeze to resolve, or launch temporarily in safe mode via gimp --no-fonts).
  2. Navigate to Edit > Preferences.
  3. In the left panel, expand the Folders tree and select Fonts.
  4. You will see default directory paths listed:
    • System paths (e.g., C:\Windows\Fonts or /usr/share/fonts).
    • User configuration paths (e.g., ~/.config/GIMP/2.10/fonts or AppData\Roaming\GIMP\...\fonts).
  5. Select the broad system directories and click the Delete or Disable icon to remove them from GIMP’s active watch list.
  6. Create a dedicated folder (e.g., D:\DesignFonts) containing only the typefaces required for design work, click the Add Folder icon, and point GIMP exclusively to this location.
  7. Click OK and restart GIMP.

3. Tuning Fontconfig Configuration (fonts.conf)

Advanced users can configure Fontconfig's global or local XML settings to blacklist bloated font directories or ignore specific font patterns.

  1. Locate the configuration file:
    • Linux: /etc/fonts/local.conf or ~/.config/fontconfig/fonts.conf
    • Windows: C:\Program Files\GIMP 2\etc\fonts\fonts.conf
  2. Open the file in a text editor with administrative privileges.
  3. Ensure the cache directory (<cachedir>) points to a local, fast-access storage drive (preferably an SSD) rather than a network drive or restricted temporary directory.
  4. Remove or comment out any <dir> nodes pointing to non-essential directories containing thousands of uncurated fonts.

4. Identifying and Purging Corrupted Font Files

Fontconfig often freezes indefinitely when encountering a corrupted font file with broken header tables.

  • On Linux, inspect the output of fc-cache -r -v for directories where the process halts.
  • Check Windows font folders for zero-byte files or shortcuts to external volumes that are no longer connected. Removing these invalid files restores standard indexing performance.