Ligature script error
-
- Posts: 18
- Joined: Mon Jan 27, 2014 5:32 am
Ligature script error
I'm trying to use some ligatures for my font but I must've done it wrong, please help:
- Attachments
-
- font error.JPG (94.65 KiB) Viewed 7342 times
-
- Moderator
- Posts: 11229
- Joined: Fri Oct 04, 2002 12:41 am
- Location: Bilthoven, The Netherlands
- Contact:
Re: Ligature script error
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...
}
feature Ligatures liga {
# Standard Ligatures
lookup LigaSub;
}
lookup LigaSub {
sub a a -> AA;
sub A A -> AA;
etc...
}
-
- Posts: 18
- Joined: Mon Jan 27, 2014 5:32 am
Re: Ligature script error
Oh, I see! Thank you!
-
- Posts: 18
- Joined: Mon Jan 27, 2014 5:32 am
Re: Ligature script error
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?
-
- Top Typographer
- Posts: 9890
- Joined: Tue Oct 29, 2002 5:28 am
- Location: Seven Kings, London UK
- Contact:
Re: Ligature script error
The script is case sensitive. You have:tsalagimahariel wrote: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?
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;
-
- Posts: 18
- Joined: Mon Jan 27, 2014 5:32 am
Re: Ligature script error
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.
Re: Ligature script error
Use the Private Use Area ($E000 - $F8FF).tsalagimahariel wrote: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.
-
- Posts: 18
- Joined: Mon Jan 27, 2014 5:32 am
Re: Ligature script error
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.
-
- Moderator
- Posts: 11229
- Joined: Fri Oct 04, 2002 12:41 am
- Location: Bilthoven, The Netherlands
- Contact:
Re: Ligature script error
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.
a
A
aa
AA
If you press F9 in the OpenType layout feature editor you will see warnings if something is not right.
-
- Posts: 18
- Joined: Mon Jan 27, 2014 5:32 am
Re: Ligature script error
I do have those glyphs and it says there are no errors when I press F9, so I'm stumped.Erwin Denissen wrote: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.
-
- Top Typographer
- Posts: 9890
- Joined: Tue Oct 29, 2002 5:28 am
- Location: Seven Kings, London UK
- Contact:
Re: Ligature script error
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.tsalagimahariel wrote: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.
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.
-
- Posts: 18
- Joined: Mon Jan 27, 2014 5:32 am
Re: Ligature script error
OK, here is the font project file. Please let me know what I've done wrong so I can correct it in the future.
<removed due to possible copyright infringement>
<removed due to possible copyright infringement>
-
- Top Typographer
- Posts: 9890
- Joined: Tue Oct 29, 2002 5:28 am
- Location: Seven Kings, London UK
- Contact:
Re: Ligature script error
I did Tools, Sort font by code-point
Font Properties, Ranges, Calculate, Code-pages calculate:
This is your lookup script for ligatures:
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
Font Properties, Ranges, Calculate, Code-pages calculate:
This is your lookup script for ligatures:
Code: Select all
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;
}
a a = AA
A A = AA
-
- Posts: 18
- Joined: Mon Jan 27, 2014 5:32 am
Re: Ligature script error
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.
-
- Top Typographer
- Posts: 9890
- Joined: Tue Oct 29, 2002 5:28 am
- Location: Seven Kings, London UK
- Contact:
Re: Ligature script error
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.Bhikkhu Pesala wrote:I did Tools, Sort font by code-point
Font Properties, Ranges, Calculate, Code-pages calculate: