tonsky / tonsky/FiraCode

Zero-width non-joiner behaves incorrectly with some ligatures

Aperta
#1,663 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Lingua principale
Clojure
Stelle
82k
Fork
3.2k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

Hiya,

I really don't know much about fonts and font development in general, so please feel free to close this issue if the described behavior is intended or likely caused by something else :)

I noticed some weird behavior with U+200C (Zero-width non-joiner). To my understanding, inserting this character should prevent the surrounding characters from forming a ligature together. In Fira Code, this behavior can be seen with the != ligature:

  • the sequence != displays as a ligature
  • the sequence !\U200C= does not display as a ligature

However, for some ligatures, this does not work. The following sequences seem to consistently render as ligatures, even though they shouldn't:

  • -\U200C> renders the -> ligature
  • ~\U200C> renders the ~> ligature
  • -\U200C- renders the -- ligature

And likely more. All of this was tested both in Kitty and in IntelliJ IDEA, with Fira Code 6.2.

Even more weirdly, when disabling ligatures (at least in IntelliJ, in Kitty disabling ligatures seems to just disable ligature rendering alltogether as U+200D doesn't even do anything anymore) the insertion of U+200C seems to force these ligatures to be rendered even if they otherwise wouldn't be, behaving the same as U+200D!

I tested this in the software that was available to me, if there's a more direct way to reproduce this without potentially being biased by application-specific ligature rendering weirdness do let me know. Again, I know very little about font developent.

Thank you! :)

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Riproduci le sequenze segnalate con Fira Code 6.2 in Kitty o IntelliJ IDEA, confrontando U+200C e U+200D con le legature abilitate e disabilitate. Determina se il comportamento dipende dal carattere tipografico o dall’applicazione di rendering; il lavoro è completato quando le sequenze interessate seguono in modo coerente il comportamento previsto del non-joiner a larghezza zero e viene documentato un percorso diretto per la riproduzione.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Ambito
design
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
28/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.