2

I'm trying to use copies of the venerable misc-fixed bitmap fonts in a Windows 10 installation of GIMP 2.10.12.

As far as I can tell, they should appear in the list of fonts after placing them in one of the many locations where gimp pulls fonts, including any custom locations set in Edit>Preferences...>Folders>Fonts. But I am unable to get either PDF or PCF fonts to appear in the list of fonts, no matter which Font directory I put them in or how many times I clear GIMP's cache.

Here it states that GIMP should be able to use these fonts, thanks to its dependency on FreeType 2:

  • TrueType fonts (and collections)
  • Type 1 fonts
  • CID-keyed Type 1 fonts
  • CFF fonts
  • OpenType fonts (both TrueType and CFF variants)
  • SFNT-based bitmap fonts
  • X11 PCF fonts
  • Windows FNT fonts
  • BDF fonts (including anti-aliased ones)
  • PFR fonts
  • Type42 fonts (limited support)

However, the above link also states that it is not an authoritative answer on what GIMP will and will not support:

For the most authoritative and up-to-date information on fonts in GIMP, consult the “Fonts in GIMP 2.0” page GIMP-FONTS at the GIMP web site. This section attempts to give you a helpful overview.

"Fonts in GIMP 2.0" only mentions TrueType, OpenType and Type1 fonts by name, but implies that's not the full list. It's a very unix-oriented page, so I don't know if anything there really applies to Windows installations.

Does the build of FreeType 2 used on Windows versions of GIMP support BDF and/or PCF fonts?

1 Answer 1

4

Yes, GIMP on Windows can use BDF and PCF fonts. The misc-fixed fonts just don't appear in the list the way you might expect them to appear. (See last paragraph for tl;dr.)

To figure this out, I disabled all font sources in GIMP except one empty directory. (For details on how to do this on Windows, see this answer.) Then I cleared GIMP's font cache and opened GIMP to verify that the fonts list was totally empty.

With that done, I added a single copy of a misc-fixed font in BDF format to my empty font directory and started GIMP. Surprisingly, a bunch of fonts showed up in the GIMP fonts list:

  • Fixed
  • Monospace
  • Monospace Bold
  • Monospace Bold Italic
  • Monospace Italic
  • Sans-serif
  • Sans-serif Bold
  • Sans-serif Bold Italic
  • Sans-serif Italic
  • Serif
  • Serif Bold
  • Serif Bold Italic
  • Serif Italic

Repeating the process with a single copy of a misc-fixed font in PCF format resulted in the same thing! So what's going on?

Some digging in GIMP's configuration files (%ProgramFiles%\GIMP 2\etc\font\conf.d) revealed that every font in the above list of fonts EXCEPT "Fixed" is an automatically generated list of font shortcuts that, if selected, will use an available font that is the best match for the given shortcut. That way, picking something like 'Sans-serif' will give you a reasonable choice for a sans-serif font on your platform.

In fact, if you look closely, you can see that the previews for the different fonts if you have only one, really small bitmap font available (like a 4x6 font) or if you have only one, relatively large bitmap font available (like a 10x20 font).

Font list with only a 4x6 bitmap font vs font list with only a 10x20 bitmap font.

This is because the font previews scale up the tiny font poorly, but they handle the not-so-tiny font much better.

If you repeat this process with a TrueType font like Arial, you'll get the same list of fonts, except the "Fixed" font will be replaced with Arial, and the previews will be beautiful because TrueType fonts scale well due being made up of Bezier curves instead of pixels, like bitmaps are.

But there's another catch! If you add a whole bunch of misc-fixed fonts of different sizes into the font directory, you still only get one "Fixed" font. This is because GIMP (or, more accurately, FreeType 2) will automatically select the bitmap that matches the desired size the closest. So if you have a 10x20 font and a 4x6 font, and you pick a font height of 20 pixels, then what appears on the screen is the 10x20 font. Similarly, if you pick a font height of 6 pixels, you get the 4x6 font.

If you happen to pick a height for which you don't have a font that's close enough in size, GIMP will scale it for you.

So, to answer the question - yes, GIMP does read PCF and BDF fonts just fine. You just have to know that:

  • They'll be listed in the font list by their "Typeface family" name.
  • Different sizes will be grouped together under their "Typeface family" name. To access the different size, simply use the name and set the size you want. To avoid auto-scaling the font, be sure to only use the exact sizes that your bitmaps provide.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .