[arch-general] pango 1:1.44-1 Renders Bitmap Fonts as Boxes.

ProgAndy admin at progandy.de
Mon Jul 29 14:04:55 UTC 2019

>>> You can convert your BDF/PCF fonts to the "X11 bitmap only sfnt
>>> (otb)" OpenType format[1], which harfbuzz does support[2].
>> So these aren't "my" fonts.  I'm using one of the bitmapped fonts that
>> ships with X in xorg-fonts-misc as my terminal font.
> `My' bitmap fonts are also packaged.

Hi Ralph,

With 'your' bitmap fonts I also meant fonts you use, not only those you
created or maintain. Doing the conversion yourself is only meant as a
workaround if you really need them now, but you could offer the
converted fonts in the AUR and become a maintainer if upstream is not

> There doesn't seem much point packaging a font in a format that isn't
> supported by most software.

The xorg-fonts packages are primarily meant for applications using XLFD
(can only use bitmap fonts) or Xft (FreeType based, so bitmap fonts
still work).

> It would seem the upstreams, GNU and X.Org, should ship those fonts
> in the current and OpenType-bitmap formats

That would be for the best.

> Speaking of conversion, ProgAndy mentioned an Adobe program.  

The Adobe program is not useful for bitmap fonts, but the conversion of
postscript/type1 (.pfa, .pfb) fonts to the opentype format. I mentioned
it for completeness, since support for that format has been dropped as well.

> And FontForge should be able to do it
> https://fontforge.github.io/generate.html lists ‘X11 bitmap only sfnt
> (otb)’ amongst the bitmap types.

I found the scripts used to convert terminus to a mixed bitmap/vector
font using fontforge, mkbold-mkitalic, and potrace. If you choose a font
size that matches a bitmap height, then the resulting font will use the
bitmap, otherwise the generated vector outlines [see *Notes*]. You could
also try to declare your fontsize in pixel with a "px" suffix. This can
be adapted to create a bitmap-only font in the "otb" format as well if
you remove the potrace stuff and change the output file format from ttf
to otb.


*Notes* about the relationship between font sizes and bitmap dimensions:

Font size is measured in typographic points: 1pt = 1/72 in.
In a standard 96 dpi environment, that would be ~1.33333 px.
A 9pt font would be 12px tall.
A 12pt font would be 16px tall.
With a HiDPI display this is not true anymore, and with mixed DPI you
might have to make sure that your chosen size resolves to an available
bitmap in either case.


More information about the arch-general mailing list