D3665: graph: improve graph output by using Unicode characters

Sean Farley sean at farley.io
Thu Jun 14 20:48:34 EDT 2018


johnstiles (John Stiles) <phabricator at mercurial-scm.org> writes:

> johnstiles added a comment.
>
>
>   It all depends on your terminal font. It looks like the font you're using now has issues with U+2506 ┆ and is otherwise working as expected.

Yeah, that was my fault. I forgot I had a different font for unicode
symbols to fix a bug in powerline. Unfortunately, it still looks similar
when I put everything to one font setting: they all look a tiny bit
broken with the fonts I've tried. That list isn't large: Fira, DejuVu
Sans (from earlier in this thread), and a random assortment of system
fonts.

Do you have any other fonts I could try?

>   Most likely it is rendering ┆ as full-width instead of narrow-width. I'm almost positive this issue is fixable if you are willing to experiment with a different font or Terminal settings, because I've never seen that particular artifact. Usually it's been the circle glyphs that want to render over-wide. :)
>   
>   If you are willing to experiment with it, there are a bunch of very similar glyphs that we could swap out and use instead if you think it would help the general case. (https://unicode-search.net/unicode-namesearch.pl?term=DASH) I'm certainly willing to explore it, but it would help to know a little more detail about your current setup (Terminal? Font? OS?) to see if I can repro the issue locally and see whether this would actually be widespread.
>   
>   Broader picture: on the whole I think we can pick a really good starting point that works for the vast majority of users' setups, but we are unlikely to land on a 100% solution for all fonts and terminals. Some fonts just look bad or won't align perfectly. Some layouts will still have little gaps in them where Unicode doesn't provide the box characters we need for a perfect layout. On the other hand, the existing ASCII mode looks unaligned and goofy on all machines all of the time, so having an optional mode that looks better for most users is still a step in the right direction :)

Agreed. Maybe would could put some font suggestions in the help? (I
don't mean amending this patch, by the way, just asking in general).

>   Additional thoughts: I would love to add features to this patch, such as glyph customizability or even color coding. I can certainly get it done in a followup. On the other hand, I don't want to sink tons of free time into the process it if I can't get this simple version through review. This is a spare-time project for me and I don't need to add flexibility options if it's only ever going to exist on my PC. I'd like to at least get a foothold in, then work on improvements once this has landed, instead of working for weeks just to risk having the feature rejected at the end of the process and having nothing to show for it.

Oh, yeah, I totally agree. Apologies for the back-and-forth on this.
Lemme play around with some fonts and whatnot after you get back on some
suggestions, and then let's try to get this landed :-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <http://www.mercurial-scm.org/pipermail/mercurial-devel/attachments/20180614/0d8516de/attachment.sig>


More information about the Mercurial-devel mailing list