Fonts in GIMP 2.x

Starting with GIMP version 2.0, font rendering is handled significantly different from the way it was done in GIMP 1.0 and 1.2. GIMP no longer uses the X server to render the fonts. Instead it uses Pango and the FreeType library. Font configuration is handled by a small library called Fontconfig. As a result you get much better font rendering with real antialiasing, support for bidirectional text and various scripts.

GIMP 2.x handles a variety of font formats, most notably TrueType, OpenType and Type1. It should be emphasized that it does not use the X server or any X font server, so don't be surprised if GIMP doesn't see the fonts you configured in your X11 setup.

Setting up Fonts for GIMP 2.x

GIMP uses Fontconfig to handle fonts, so setting up fonts for GIMP 2.x is merely a job of setting up Fontconfig. But GIMP is not the only application that uses Fontconfig. Recent desktops such as GNOME use it as well, so there's a good chance that everything is properly setup already and fonts will just work for you. If they don't, you will have to create or edit your font configuration file as explained in the Fontconfig User Manual.

Adding Fonts (system-wide)

As soon as Fontconfig is properly setup, adding fonts is just a matter of placing them into a directory that is searched by Fontconfig. Have a look at /etc/fonts/fonts.conf (and perhaps /etc/fonts/local.conf) to find out what directories are searched. After copying the fonts there, you should run fc-cache to regenerate the fonts cache. Fonts added this way will be available to all applications using Fontconfig.

Adding Fonts (for GIMP only)

You might want to install fonts for use with GIMP only or you might not have permissions to install fonts system-wide. To make this possible, GIMP 2.x also looks for fonts in the GIMP specific font search path that can be configured in your gimprc or from the Preferences Dialog. So, in order to install fonts to be used with GIMP, you can just copy them to ~/.gimp-2.6/fonts, press the Refresh button in the Fonts dialog and start using them.

Known Problems

There have been reports of crashes at startup when GIMP scans your font directories. These crashes should go away as soon as you update to a newer version of fontconfig (>= 2.2.0). As a quick workaround you can start gimp with the --no-fonts command-line option but of course you will not be able to use the text tool then.

1 comment:

Troy James Sobotka said...

Why on earth I didn't find this blog earlier is bewildering.

Wonderful artist and a Free Software user too? Wow. Love to chat more with you about that combination...

Terrific stuff. I'm simply blown away.