3 ms·
I found line-drawing characters to be so inconsistent in fonts that I implemented them directly in my terminal emulator’s rendering code. For example, when I s
by makecheck 10y ago
I found line-drawing characters to be so inconsistent in fonts that I implemented them directly in my terminal emulator’s rendering code. For example, when I see a box-drawing symbol, I bypass the font completely and draw lines myself so that the result is guaranteed to align consistently with other cells and guaranteed to touch adjacent cells without any gaps from font layout engines. It’s amazing how much nicer it can be when you do this.
This font does remind me of a lot of other useful symbols though, beyond normal box-drawing sets.
- heywire 10y agoNow you've got me curious, do you happen to have a screenshot? And is this a terminal emulator that you've written for existing operating systems, or part of your own?
- makecheck 10y agoFor Mac, only. I put some images here as examples, that use Markus Kuhn’s Unicode demo. MacTerm[0], iTerm2[1], and Apple Terminal[2]. As you can see, the box drawing is really messed up when fonts are relied upon in the other two terminals. [0] http://www.macterm.net/images/BoxDrawingMacTerm.png http://www.macterm.net/images/BoxDrawingMacTerm.png [1] http://www.macterm.net/images/BoxDrawingITerm2.png http://www.macterm.net/images/BoxDrawingITerm2.png [2] http://www.macterm.net/images/BoxDrawingAppleTerminal.png http://www.macterm.net/images/BoxDrawingAppleTerminal.png
- conistonwater 10y agoIn [1], why are the boxes of successively larger size out of order, on the right side of the image? It makes no sense to me how that'd happen.
- makecheck 10y agoNot sure, that's from iTerm2. :) I can only guess that the symbols come from different fonts entirely (the Mac can perform such substitutions). The half-filled and all-filled variants may be easier for font designers to implement than the others so those two come from the chosen font while the rest come from a substituted font.
- jxy 10y agoWhat you are doing is fine except that when some fonts have their own flavors of the box-drawing characters. See monofur for an example.
- makecheck 10y agoI'd considered adding at least a low-level preference to disable box-drawing overrides, and I still might. With the overrides though, you do not have to install any particular font to have accurate line-drawing, and you can see lines even when choosing a font that might not otherwise be designed for line-drawing.
- throwaway161215 10y agorxvt-unicode does this, but I haven't see a need for it in xterm if your font isn't incomplete. If you're using UTF-8 and a Unicode TTF/OTF, then it's no problem in xterm, but other terminal emulators are not always drawing it as correctly so you certainly have a point here.
- david-given 10y agoI did exactly the same thing for WordGrinder's virtual terminal (it's a terminal-based app; but for Windows and X, there are versions which implement their own terminal using GDI and Xlib respectively, for more consistent font and style rendering). Screenshot: https://get.google.com/albumarchive/118274112180368285367/album/AF1QipPNN71cFV5MUyjLWRF2xmsP6rY5tXlGCSzKZQcc/AF1QipMWoceIP9V8OCXK5bkc5XsuChZUDn1cxMknrtIi?source=pwa#6197821261592407506 https://get.google.com/albumarchive/118274112180368285367/al... By comparison, this one's rxvt: https://get.google.com/albumarchive/118274112180368285367/album/AF1QipPNN71cFV5MUyjLWRF2xmsP6rY5tXlGCSzKZQcc/AF1QipMYVwa2g4d6sk-A9BC0Tm3rzlA6DZN3TZeUERXo?source=pwa https://get.google.com/albumarchive/118274112180368285367/al...