FiraCode icon indicating copy to clipboard operation
FiraCode copied to clipboard

Simplify ligatures code

Open tonsky opened this issue 4 years ago • 1 comments

Originally Fira Code uses scheme with spacer + single-space ligature that extends beyond its bounding box:

Screenshot 2022-01-18 at 14 11 47

This was done to allow editors to “step inside” the ligature.

Since the original release, many editors now acknowledge the existence of ligatures and don’t need that trick. Maybe ligature code could be simplified?

Potential upsides:

  • Much simple ligature code
  • Ligatures could be assigned code points and used in e.g. Emacs #211
  • Fix ligatures inside RTL

photo_2022-01-18 14 15 07

Questions to check:

  • [ ] Check which editors will not “step into” ligatures
  • [ ] Check if Linux will be ok with double-, triple- etc size glyphs #1073

tonsky avatar Jan 18 '22 13:01 tonsky

Another interesting behavior discovered in CoreText.

Screenshot 2022-01-18 at 16 26 03

It feels like < is replaced with > in RTL first, then calt is applied, and then glyphs order is reversed for RTL text

tonsky avatar Jan 18 '22 15:01 tonsky