Open notpeter opened 3 months ago
Is it a ligature?
Yes, multiple. I'm fine with the double colon ::
ligature (first colon moves horizontally to make ::
versus a solo :
) the issue is that there are (at least) two distinct ::
ligatures with different vertical heights. Which is used depends on the character that follows the ::
so ::A
or ::
(end of line) is lower than ::<
or ::)
.
Assuming a line where █ is the cursor position:
mem::size_of::█
-> mem::size_of::<█
-- double colon moves up.String::from(mem::size_of::█)
-> String::from(mem::size_of::<█)
-- double colon doesn't moveString::from(mem::█)
-> String::from(mem::s█)
-- double colon moves down
Discussed in https://github.com/zed-industries/zed/discussions/10527
Originally posted by notpeter April 14, 2024 While coding in Rust I observed an odd behavior where the colon glyphs dance as you type them.
To reproduce type out the following:
The colon(s) move twice: First, when you type the second colon (horizontally) and then when you type a letter after (vertically). No idea why the vertical movement only happens inside parens.
The Iosevka customizer used to generate zed-fonts doesn't currently support defining variants for the ':' character, but I opened an issue to see if they might in the future. In writing that up I also discovered the
::
sometimes dances up or dances down or just stays put depending on context. Fun!