Christof Kälin
Christof Kälin

Reputation: 1340

Using inconsolata font in putty: Too much line-spacing

This might not be related to putty, but it's strikingly visible there: Using Google's Inconsolata font (https://fonts.google.com/specimen/Inconsolata) in putty results in a very high line spacing: inconsolata line spacing on putty

I know it has to do with the font itself, as using "Consolas" and others shows the difference. But I'm just wondering, if anyone has a solution to use this very nice font in putty?

Upvotes: 5

Views: 2391

Answers (3)

benrg
benrg

Reputation: 1937

This seems to be Google's fault.

Inconsolata as originally designed by Raph Levien had much tighter vertical spacing. Last December, Google announced a project to "raise the quality" of a number of their fonts including Inconsolata. They drastically changed Inconsolata's metrics, making it much taller and slightly narrower (without changing the glyphs themselves), and instead of giving it a new name, they replaced the original font, effectively breaking any web site that used their API and relied on the old metrics. They also replaced the font's distinctive curved single and double quotes with generic straight quotes, which is an easy way to tell the old and new versions apart (aside from the spacing).

The revamped (and in my opinion inferior) version is identified as version 2.x in the TTF files, and the old version is 1.x (last release 1.016). You can get version 1.016 from the Github repository here.

Edit: I looked into it some more:

  • The new version has the same defined width, but it rendered at a different width on my machine at small point sizes because of some other change in rendering instructions.
  • It looks like they actually redrew every glyph. They have all changed slightly, and some significantly – especially at low pixel sizes because the hinting is completely different. The distinctive curved quotes and the low crossbar of the f are gone, but the microserifs and curved descenders are still there. I'd describe 2.x as a new typeface inspired by 1.x.
  • Raph Levien now works for Google, but he isn't on the list of designers who did the overhaul, so I don't know whether he knows about this or was involved.

Upvotes: 1

thomasrutter
thomasrutter

Reputation: 117401

I too am frustrated by the lack of control over spacing between the lines in Putty.

Unfortunately it is not possible to adjust it in Putty. Putty merely uses the font itself as a guide and adds no extra line spacing. You would have to adjust it in the font, which is non-trivial.

Adjusting the font size up or down 1 pixel can sometimes change the line spacing due to rounding (Putty uses "point size" increments which are not exactly 1 pixel each). Or just use another font.

For tighter line spacing you can try DejaVu Sans Mono or Fira Sans Mono, for wider line spacing Consolas or Source Code Pro.

Upvotes: 3

Christof Kälin
Christof Kälin

Reputation: 1340

I found a workaround using this variant of Inconsolata font: http://levien.com/type/myfonts/inconsolata/. They seem to have a better line spacing than the "original" one.

Upvotes: 1

Related Questions