DEV Community

Ron Barry
Ron Barry

Posted on

Can you create custom glyphs for iTerm? (Strongly prefer on-the-fly so users don't have to install a font.)

I have a network stats application that is showing good promise, but suffers from a lack of screenspace. It shows timeseries graphs of ping RTT, packet loss %s, and a bunch of other stuff. I'd like to expand it to show not just max RTT on the appropriate graph, but max, 90th percentile, average, and mean.

For the moment, I'm using the ▂▃▄▅▆▇█ characters, stacked up about 10 rows high, to give a graph of max RTT. I'd rather use characters that are simply straight lines across the glyph but they already exist at a code point that is rarely supported anymore (U+1FB76-U+1FB7B). Most importantly, I can't combine them to draw 2, 3, or 4 horizontal lines through a character if multiple data series occupy different values in that same block of the graph.

I did some fiddling with the overdraw code points (U+0300-U+03F) that are usually used for diacriticals, but that's a deep rabbit hole with nothing but dead ends for my application.

If there's a way that, from within python, I can construct a custom glyph set to do what I need, that would be the easiest solution to my problem. iTerm2 seems to have everything else in it, and it wouldn't surprise me if there was a way that code could interface with the environment to produce this effect.

Any thoughts?

Top comments (0)