tonsky / tonsky/FiraCode

Zero-width non-joiner behaves incorrectly with some ligatures

未关闭
#1,663 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
Clojure
星标
82k
派生
3.2k
PR 合并指标
30 天内没有已合并 PR

描述

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! :)

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

使用 Fira Code 6.2 在 Kitty 或 IntelliJ IDEA 中重现已报告的序列,并比较启用和禁用连字时的 U+200C 与 U+200D。确定该行为是由字体还是渲染应用程序导致的;当受影响的序列始终符合预期的零宽非连接符行为,并且已记录直接的重现路径时,即视为完成。

由索引模型根据 Issue 内容生成。

评估

领域
design
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
需要澄清
新手友好度
28/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。