Some characters like = (equal) have an identical onum variant (equal.tosf). This breaks the ligatures since there are none with equal.tosf.
Normal:

With ligatures (default):

With oldstyle nums:

With both:

Remove the .tsof variant for characters that doesn't change with the onum feature to restore default ligatures.
Thanks
Makes sense, but still leaves lots of characters that do change. May I ask what鈥檚 your use-case? Why are you turning on both old-style numerals and ligatures?
Because I like coding with old-style nums (for some reason it helps me read long numbers) and I like this font ligatures!
Besides removing features seemed like an easy fix, since most ligatured chars (at least the one I use) do not change.
FYI I removed (with fontforge I don't have access to glyphs) all .tsof variants except numbers (which seem to be the only ones varying) and everything is working fine except the multiply (1x1) and the uc (1:1) ligatures that operate on regular numbers and not on the old style. (It still is a lot better)
Would someone be so kind to explain this change for curious simpletons like myself?
This change means that you鈥檒l be able to use old-style numbers along with ligatures that appear directly next to numbers. Here鈥檚 a screenshot showing the difference between normal and old-style numbers:
![]()
@camsteffen
Ligatures are pattern based. E.g. you want to replace -> with an arrow. The code for that would be:
sub hyphen greater by hyphen_greater.liga;
So if your program sees hyphen glyph followed by greater glyph it would replace both with a single hyphen_greater.liga which contains a double-width arrow in case of Fira Code.
Old-style numbers are implemented the same way:
sub zero by zero.onum;
sub one by one.onum;
The problem is that it used to replace not only numbers but some symbols like -, +, <, >, % and so on. If onum substitution happens first ligatures won鈥檛 work because character is not different:
hyphen greater -> hyphen.onum greater.onum -> ??? (does not match <hyphen> <greater>)
This change removes substitutions for everything except the numbers, so both old-style numbers and ligatures can work at the same time.
Most helpful comment
@camsteffen
Ligatures are pattern based. E.g. you want to replace
->with an arrow. The code for that would be:So if your program sees
hyphenglyph followed bygreaterglyph it would replace both with a singlehyphen_greater.ligawhich contains a double-width arrow in case of Fira Code.Old-style numbers are implemented the same way:
The problem is that it used to replace not only numbers but some symbols like -, +, <, >, % and so on. If onum substitution happens first ligatures won鈥檛 work because character is not different:
This change removes substitutions for everything except the numbers, so both old-style numbers and ligatures can work at the same time.