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

Variant: colon vertically centered #2321

Closed
2 of 3 tasks
notpeter opened this issue Apr 29, 2024 · 4 comments
Closed
2 of 3 tasks

Variant: colon vertically centered #2321

notpeter opened this issue Apr 29, 2024 · 4 comments

Comments

@notpeter
Copy link

  • The requested variant shape does not go too far away from Iosevka's design.
  • The requested variant does not conflict with any characters in Unicode that Iosevka currently supports.
  • At least two monospace/programming fonts, created by different designers, supported the requested variant. Provide images below.

The vertical placement of : (and related ligatures: ::, :::, etc) varies depending on context:

  1. Colon sits on the baseline or
  2. Colon sits vertically centered on the median

Specifically typing ::< character-by-character (used for the turbo fish operator in rust) results in the three distinct positions of the colon. The horizontal movement when making the :: (expected ligature behavior) and vertical movement when typing the subsequent character. I find the vertical movement extremely distracting. It occurs when a : is followed by any of <>=-+ (not just <).

Depending on context, the colon(s) move up or down when the next character is typed. Here is an animated example demonstrating these behaviors:

colon-colon2

Proposal: add variants for the colon character : so a vertically centered placement can be enabled as a default. This currently possible with the * character, but not for :. Such a variant would also make it possible to avoid two successive :: within a single call being displayed at different heights (see: mem::size_of::<u8> in the gif above.)

I observed this behavior in the Zed editor which includes an Iosevka customization Zed Mono. Here is the associated custom build config.

@glepnir
Copy link

glepnir commented May 13, 2024

I got same problem . reprocue can by simply using a rust code like std::O

Copy link

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 15 days.

@github-actions github-actions bot added the stale label Jul 13, 2024
@notpeter
Copy link
Author

Zed switched their default font from 'Zed Mono' (an Iosevka derivative) to 'Zed Plex Mono' (an IBM Plex Mono derivative) so this is not longer a major concern.

I really like all the other ligatures in Iosevka, but having dancing colons made it unsuitable for Rust programming so in the absence of this variant I've moved elsewhere.

@be5invis
Copy link
Owner

Well, well, in current C-like ligation set we already prohibit : from centering.

image

I think maybe you can simply change your font feature settings to CLIK (and turn off calt)? In VSCode you could do this:

    "[rust]": {
        "editor.fontLigatures": "'calt' 0, 'CLIK' 1"
    },

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants