vercel / geist-font

https://vercel.com/font
SIL Open Font License 1.1
2.13k stars 54 forks source link

Typescript generic issue #57

Open y0na24 opened 7 months ago

y0na24 commented 7 months ago

Font Name (Geist Sans/Geist Mono):

Description of the Issue: When I try to use generic in typescript, i can't go between arrows as it be taken as one symbol.

Steps to Reproduce:

  1. as in screenshot, just type any interface with generic type, for example FC<>

Expected Behavior: I expected to have an opportunity to go between these arrows and write my interface, but the cursor just goes left or right, but not in the middle

Screenshots:

Geist bug

If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

Additional Context: Font looks great, this bug is the only bad a thing, imo of course

y0na24 commented 7 months ago

And I found out, that it works like that only with enabled ligatures, if i disable it, there is no problem

screenshot
mybearworld commented 7 months ago

Shouldn't you be able to go between those two characters? (Screenshot isn't with Geist Mono) A screenshot of the text `document.querySelector<>("a");` in VSCode, with the cursor between the two angled brackets, despite the fact that <> is a ligature.

y0na24 commented 7 months ago

yeah, but it is impossible right now with enabled ligatures using Geist Mono

mybearworld commented 7 months ago

yeah, but it is impossible right now with enabled ligatures using Geist Mono

It works with Cascadia Code. What happens if you try to go inbetween?

chengluyu commented 7 months ago

Hello everyone, this is because Geist Mono doesn’t use contextual alternates to implement the ligature of programming languages. I’m trying and making some progress on my own fork! Stay tuned!

Before:

https://github.com/vercel/geist-font/assets/2239547/cfb7c9ce-5deb-4b0c-b406-bcd24368e793

After:

https://github.com/vercel/geist-font/assets/2239547/d777a581-97dd-4868-9b58-d972b642aee0