Open stevemolitor opened 7 months ago
The problem is indeed the ligature names; font designers are free to use any names for their ligatures they want, and while it's common to include "lig" or "liga" in the name somewhere, it's not required.
Actual ligature information is stored in the GSUB (glyph substitution) and CALT (contextual alternates) tables in the font. Making sense of these is not straightforward; there are many layers of indirection.
Historically, I've had decent results by studying the source code for the font to figure out the naming convention for its ligatures, then using strings
to dump a list of ligatures from the font file itself. I realize this is not a very satisfying answer.
A better approach probably involves using fontforge
and a script that processes the GSUB/CALT tables, but I don't have one lying around.
This is more of a question than an issue, although maybe the answer could be added to the docs in case others find it useful:
How do I find the name of the ligatures in fonts besides Fira Code, so that I can customize a font with their ligatures using Ligaturizer? Specifically, I want to use the ligatures in Iosevka with the M+ Code font.
I tried just editing ligaturizer.py to use Iosevka source fonts instead of Fira. It found the fonts but no ligatures showed up in the output font.
I did the same thing using JetBrains Mono as the source of ligatures, and it worked - I got JetBrains ligatures in M+ Code. But it didn't work with Iosevak as the ligature source. I did build Iosevka with ligatures, and I can see them when I use Iosevka directly in my editor.
My guess is that since Jet Brains sort of inherited from Fira, it uses the same ligature names so everything still works. But with Iosevka the ligature names are different maybe? Or something?
I tried opening up Iosevka in FontForge but I wasn't sure how to find the ligatures (it's a huge font).
Maybe the ligature names are not the problem, maybe it's something else. So more generally, how do I use Iosevaka as the ligatures donar?
Also see #22.