I’m trying to use some ligatures for my font but I must’ve done it wrong, please help:
Don’t include the lookup definition in the feature but split them like this:
feature Ligatures liga {
Standard Ligatures
lookup LigaSub;
}
lookup LigaSub {
sub a a → AA;
sub A A → AA;
etc…
}
Oh, I see! Thank you!
The error is gone but when testing my font the ligatures still don’t show up properly a a for example still appears like a a as opposed to aa. Any clue what I could’ve done wrong?
The script is case sensitive. You have:
sub a a → AA;
sub A A → AA;
both of which will produce the glyph AA. Try this, and make your that your glyphs are correctly named too:
sub a a → aa;
sub A A → AA;
Ok I have it to work now only thing is it replaces them with a square instead of my glyph. The name is righ but my ligature glphs don’t have codepoints as I don’t know what to use for a custom ligature.
Use the Private Use Area ($E000 - $F8FF).
Thank you. I’ve done that but I’m still getting the blocks. So now my ligature names and codepoints are right so I don’t know what else might be wrong.
In order for your sample script to work, you need glyhps with these names:
a
A
aa
AA
If you press F9 in the OpenType layout feature editor you will see warnings if something is not right.
I do have those glyphs and it says there are no errors when I press F9, so I’m stumped.
There are some Unicode code-points assigned to AA, aa, OO, and oo ligatures in Latin Extended D character set, but you might as well keep them all together in the Private Use Area.
You should also update the Unicode Ranges and code-pages in Font Properties, Ranges.
Perhaps Word’s Autocorrect is messing things up for you, fixing accidental use of Caps Lock?
If you’re still have problems, attaching the font is probably the quickest way for us to see what’s wrong.
OK, here is the font project file. Please let me know what I’ve done wrong so I can correct it in the future.
I did Tools, Sort font by code-point
Font Properties, Ranges, Calculate, Code-pages calculate:
This is your lookup script for ligatures:
lookup LigaSub {
sub a a -> AA;
sub A A -> AA;
sub a h -> AH;
sub A H -> AH;
sub e i -> EI;
sub E I -> EI;
sub e y -> EY;
sub E Y -> EY;
sub i i -> II;
sub I I -> II;
sub i r -> IR;
sub I R -> IR;
sub o o -> OO;
sub O O -> OO;
sub u r -> UR;
sub U R -> UR;
sub u u -> UU;
sub U U -> UU;
}
For me, typing AA or aa in the Font Test window makes the same glyph substitution to glyph AA as the script tell it to do, so I don’t understand what the problem is.
a a = AA
A A = AA
Yeah that’s because both should be the same; but did you do anything to fix it? If not why is it in the same font test window I get the square? I have no clue whats going on, weird.
As I said above, but it makes no difference — your original project file also works just the same:
Try Help, Check for Updates to see if you have the latest version.
I just did and it still says No Updates.
Do export the font file, and upload it here. I’m sure that reveals the problem.
Here goes nothing.
Open your project file.
Tools, Sort font, by Unicode code-points.
Then export the font again. That will fix it.
When I re-export the font, it works for me regardless of whether or not I’ve sorted it by Unicode codepoints.