Quantcast
Channel: User Bass - Super User
Viewing all articles
Browse latest Browse all 35

Different line spacing depending on font encoding

$
0
0

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):

enter image description here

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):

enter image description here

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:

enter image description here

ISO 10646-1 (which stands for Unicode):

enter image description here

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.


Viewing all articles
Browse latest Browse all 35

Trending Articles