vim-haskellConcealPlus icon indicating copy to clipboard operation
vim-haskellConcealPlus copied to clipboard

Alternative glyphs

Open voidzero opened this issue 8 years ago • 4 comments

A lot of glyphs don't work with my preferred font Terminus and/or my terminal urxvt, so I started to compile a list of viable alternatives. But then I couldn't stop until I was at the end of the unicode table. It was fun to look at the extreme diversity of glyphs that exist, but the list became a bit large.

Still, I wanted to share it, because I'm sure there are many usable symbols in this list that are supported by more fonts and terminals. Have a look:

https://gist.github.com/voidzero/854d8787abdfa687e6bc

voidzero avatar Aug 25 '15 19:08 voidzero

Also, I saw that Int was currently without a glyph - only Integer is covered (with ). I made a few suggestions. Either was a bit more difficult. I wanted to add suggestions for the others too, i.e. Maybe, Just, Nothing, True, False, but that's when I got into a gathering frenzy.

voidzero avatar Aug 25 '15 19:08 voidzero

I think alternative glyphs are OK as long as we have a config switch to disable/enable them. However, if anything, I would encourage to improve the fonts instead. I use Terminus myself (on low-DPI screens), and I was tempting to just go ahead and add a few missing glyphs to it (it did not seem to be very difficult at the first glance). However, the terminals that I use (terminology and lxterminal at this moment) support missing glyphs substitution from other fonts... It might look a bit ugly but works, so I never felt motivated enough to actually modify Terminus. (Ideally, I'd just switch to >300 DPI screens everywere and use DejaVu Sans Mono. :)

As for Either, Maybe, etc. The current script can conceal those. Right now the idea behind concealing Either/Maybe/Bool is to use bold font for types (Either becomes bold E) and italics for constructors (Left/Right, becomes italic L/R).

enomsg avatar Aug 25 '15 20:08 enomsg

I understand what you're saying. I started working on this list because I think that some glyphs use double-width characters, or maybe full-width.. I'm not sure what to call them. I don't know much about fonts and glyphs to be honest.

But I did try a couple of other terminals, including evilvte, and you're right, lxterminal does show the glyphs correctly. It already was a while ago, but if memory serves me right, I didn't prefer lxterminal because it does not support colour customisation, and with urxvt I have changed the base colors in ~/.Xdefaults. Switching to something else was too difficult to get used to.

(That's the problem with fonts and terminals: once you start messing with them, they eat up all of your time, and the preferences are often too personal. It seems impossible to make everyone happy.)

As an alternative, what do you think about an option to choose glyph sets instead of the individual glyphs? This would greatly reduce the number of options and make configuration less confusing.

As an aside, for completeness sake, I could not get the following glyphs to work in urxvt and vim, they only work in gvim on my local machine, but only the left half displays correctly:

𝐒, 𝐓, 𝐄, 𝑅, 𝐿, 𝐌, 𝐽, 𝑁, ⓑ, ⓓ, ⓜ, ⨢, 𝐓, 𝐅, 𝑇, 𝐹.

DevaVu Sans Mono does not seem to support: ⓑ, ⓓ, ⓜ.

edit by the way, I did not realise you intended bold for types and italics for constructors. I do like such uniformity.

voidzero avatar Aug 25 '15 20:08 voidzero

Looks like I was wrong regarding the glyphs Terminus supports... turns out I was using multiple fonts (which is possible in urxvt)... the 'unifont' is a secondary font I use with support for more unicode chars.. those that Terminus does not have. http://unifoundry.com/unifont.html

voidzero avatar Aug 30 '15 10:08 voidzero