Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zed Mono Font: colon glyph vertical movement #25

Open
notpeter opened this issue Jun 14, 2024 · 2 comments
Open

Zed Mono Font: colon glyph vertical movement #25

notpeter opened this issue Jun 14, 2024 · 2 comments

Comments

@notpeter
Copy link
Member

Discussed in zed-industries/zed#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:

fn family() -> String {
    String::from(std::consts::FAMILY)
}

colon

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!
colon-colon2

@someone13574
Copy link

Is it a ligature?

@notpeter
Copy link
Member Author

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 move
  • String::from(mem::█) -> String::from(mem::s█) -- double colon moves down

@notpeter notpeter transferred this issue from zed-industries/zed Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants