Open ghost opened 4 years ago
As a workaround, you could try https://github.com/twardoch/fonttools-utils/tree/master/pyftfeatfreeze which allows you to “bake in” certain stylistic sets to make them defaults in a special version of the font. You’d then have to put them online so Blink can access them, but a GitHub Pages-served version should work fine.
I tried that to get the alternative styles in iTerm2:
for i in Bold Light Medium Regular Retina; do pyftfeatfreeze -f 'ss01,ss03,ss05' -R 'Fira Code/Fira Alt Code,FiraCode/FiraAltCode' FiraCode-$i.otf Fira-Alt-Code-$i.otf; done
Alternative styles work as expected in blink. For some reason, though, ligatures stop working. Using the same font in iTerm2, both alternative styles and ligatures work. Any suggestions?
Hmm, I suspect this is a manifestation of tonsky/FiraCode#869 — the title of the issue suggests differently, but reading through it seems to suggest ligatures can entirely break if you enable any of these—except for (I’d imagine) ss20
, since substituting oldstyle figures for lining figures can be done without such a kludge.
Why the font works correctly on iTerm2 and not Blink, though—I’m baffled.
Hi.
It appears that blink.sh does not accept the .monaco-editor CSS property that Fira Code uses to enable stylistic sets. See https://github.com/tonsky/FiraCode/wiki/How-to-enable-stylistic-sets#css
I added the appropriate lines to the Fira Sans template from https://github.com/blinksh/fonts/blob/master/Fira%20Code.css and tried to import the resulting CSS into blink.sh. However, the alternatives were not working.