9

At my new job I'll need to use a mac, and I'm trying to use tmux with iTerm version 2.

While horizontal borders appear to be displayed with the proper ACS box-drawing characters[1], the vertical borders are dashed. This is not a problem in Terminal.app, the borders are displayed correctly. The problem appears to occur regardless of the font I select.

In all the screen shots I can find of iTerm and tmux this seems to be the case as well. Is this simply a limitation of iTerm, or is there a problem with my terminfo or locale?

[1] Tmux borders displayed as x q instead of lines?

Community
  • 1
  • 1
Tammer Ibrahim
  • 193
  • 1
  • 5

4 Answers4

7

Old post but anyway for people looking into this still. I find it best to set a different font for Non-Ascii characters and my actual font used for ASCII characters.

For reference I use Menlo for Powerline for Non-ASCII and Droid Sans Mono for my ASCII font and this sorts out the vertical line spacing without faffing around with vertical spacing etc.

krak3n
  • 948
  • 6
  • 13
  • I was having the same problem using https://github.com/Robpol86/terminaltables with iTerm2 and this solved it nicely. – mgk Feb 07 '15 at 19:49
  • This works for me, it seems the characters that make up the vertical bar are non-ASC, so use the "Non-ASC font" in iterm. I use Menlo at 18pt and there is no gap in the bar. You can se the "regular font" to something else for the code. – Kris Jun 17 '15 at 09:56
  • Do not pick two different size fonts, if that is what @Kris is suggesting. Fyi, I use `Source Code Pro for Powerline` @ 14pt for my non-Ascii font, and `Inconsolata-g for Powerline` @ 14pt for my iterm2 font (using iTerm 2 beta 2.9). Though while not a perfect line, developing with ascii art and ascii diagrams is much nicer. Make sure your Ascii font matches the same size as your Non-ascii font. Especially if your are a coder: ascii diagrams, tmux + airline/powerline, etc will be much nicer. – eduncan911 Mar 08 '16 at 13:45
3

The gap you see between the vertical bar characters is a combined effect the current font's design and vertical spacing. For me, I saw a marked decrease in the gaps when I switched to Courier New, but I also don't observe a difference between iTerm2 and Terminal for the same font. Decreasing the vertical spacing from the font selector can help, but may also crowd the lines together too much.

chepner
  • 497,756
  • 71
  • 530
  • 681
2

Update: This worked for me! https://github.com/Determinant/inconsolata_for_powerline_mod

I don't think that's the solution. I have noticed the same issue. What I see is that if I make my font huge, the alphanumerics scale accordingly, but the box drawing characters dont. Not sure where the issue lies. Notice in the attached image how the alphanumerics have scaled proportionally but the line drawing characters have not. Font is Inconsolata at 14pt.

https://i.stack.imgur.com/KOipL.png

Alives
  • 648
  • 5
  • 11
  • I can't get it perfect with my preferred line height and font size, but messing around with the vertical spacing slider got me pretty close. I've just learned to ignore the gap, the fact that the horizontal characters work with my settings probably makes that easier. Probably an iTerm bug and not a configuration issue. – Tammer Ibrahim Nov 01 '12 at 03:28
2

In iTerm2 I was able to get things looking near-perfect by using a larger font for non-ascii characters:

enter image description here

Settings:

enter image description here

devth
  • 2,738
  • 4
  • 31
  • 51