0

In KDE's Konsole, when using a custom build of FontBureau's "Input Mono" font, things are rendered as though the fonts are proportional. This causes no end of problems, as Konsole isn't prepared to handle proportional fonts. The most obvious problem is that the cursor position frequently is incorrect.

For example, the first line of "|" and the line of "M" should be same width, but they aren't. The cursor on the bottom line should be at the very end of the second line of "|", but there is a gap. enter image description here

It should look like this: enter image description here

1

The problem has several parts:

  1. If you're using a custom version, either customized on the FontBureau web site or using the provided inputCustomize.py, the resulting fonts have a family name of "Input", not "Input Mono" as one might expect.
  2. Downloads include the "template" fonts, which the customization tool can use to create new custom versions. These template fonts can be found in Scripts/_template_*.txt. They also have a family name of "Input". They are (kinda of?) proportional, and not intended for direct use.
  3. I unzipped the entire contents of the Input_Font.zip file into my font directory.
  4. fontconfig can find fonts even if they have unusual extensions, including .txt.

When fontconfig rebuilt the cache with the Input fonts it found the template fonts in addition to my custom build. It ended up choosing the template fonts over my monospace custom version. So Konsole seemed to be using proportional fonts because it was!

This is also why the two screenshots above are more different than just widths; the correct version looks distinctly lighter. It is, because it's a different font.

The easy fix is to delete the Scripts directory, or otherwise modify the template files so fontconfig doesn't recognize them. I did this:

$ cd Scripts
$ find -name '*.txt' -print0 | xargs -0 gzip

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.