tonsky / FiraCode

Free monospaced font with programming ligatures
SIL Open Font License 1.1
76.7k stars 3.09k forks source link

Simplify ligatures code #1355

Open tonsky opened 2 years ago

tonsky commented 2 years ago

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:

photo_2022-01-18 14 15 07

Questions to check:

tonsky commented 2 years ago

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