Historically, I've been using Monotype Courier New as my XTerm font (it displays well both Cyrillic characters and box-drawing characters). When migrating from legacy KOI8-R to UTF-8 locale, I've noticed a change in the inter-line spacing (or leading), which made Courier New no longer suitable for terminals.
Here's how my XTerm used to look in ru_RU.KOI8-R
locale (12pt Courier New):
Here's how it looks now (ru_RU.UTF-8
, 12pt again, character width is the same, but note the increased leading, vertical box-drawing charaters form a double "dashed" line):
Apparently, XTerm is not the only application affected. Basically, all programs using Core X11 Fonts exhibit the same behaviour. Take a look at xfontsel
displaying different encodings of the same font:
KOI8-R:
ISO 10646-1 (which stands for Unicode):
Interestingly, Courier New seems to be the only monospaced font affected. Other fonts, like -misc-freemono-*
, have the same leading regardless of the encoding.
Now, the question:
Is there any way I can enforce the particular leading for a particular font? Should I look into the FreeType library? Or Xft? Any ideas are appreciated.