Ligature script error

Get help with FontCreator here. Please do not post feature requests or bug reports here.
tsalagimahariel
Posts: 18
Joined: Mon Jan 27, 2014 5:32 am

Ligature script error

Post by tsalagimahariel »

I'm trying to use some ligatures for my font but I must've done it wrong, please help:
Attachments
font error.JPG
font error.JPG (94.65 KiB) Viewed 7342 times
Erwin Denissen
Moderator
Moderator
Posts: 11229
Joined: Fri Oct 04, 2002 12:41 am
Location: Bilthoven, The Netherlands
Contact:

Re: Ligature script error

Post by Erwin Denissen »

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...
}
Erwin Denissen
High-Logic
Proven Font Technology
tsalagimahariel
Posts: 18
Joined: Mon Jan 27, 2014 5:32 am

Re: Ligature script error

Post by tsalagimahariel »

Oh, I see! Thank you!
tsalagimahariel
Posts: 18
Joined: Mon Jan 27, 2014 5:32 am

Re: Ligature script error

Post by tsalagimahariel »

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?
Bhikkhu Pesala
Top Typographer
Top Typographer
Posts: 9890
Joined: Tue Oct 29, 2002 5:28 am
Location: Seven Kings, London UK
Contact:

Re: Ligature script error

Post by Bhikkhu Pesala »

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?
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;
My FontsReviews: MainTypeFont CreatorHelpFC15 + MT12.0 @ Win 10 64-bit build 19045.2486
tsalagimahariel
Posts: 18
Joined: Mon Jan 27, 2014 5:32 am

Re: Ligature script error

Post by tsalagimahariel »

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.
Alfred
Top Typographer
Top Typographer
Posts: 1030
Joined: Thu Apr 18, 2013 8:08 am

Re: Ligature script error

Post by Alfred »

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.
Use the Private Use Area ($E000 - $F8FF).
FC14 Pro (Help) + MT11.0 Pro (Help) • Windows 10
tsalagimahariel
Posts: 18
Joined: Mon Jan 27, 2014 5:32 am

Re: Ligature script error

Post by tsalagimahariel »

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.
Erwin Denissen
Moderator
Moderator
Posts: 11229
Joined: Fri Oct 04, 2002 12:41 am
Location: Bilthoven, The Netherlands
Contact:

Re: Ligature script error

Post by Erwin Denissen »

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.
Erwin Denissen
High-Logic
Proven Font Technology
tsalagimahariel
Posts: 18
Joined: Mon Jan 27, 2014 5:32 am

Re: Ligature script error

Post by tsalagimahariel »

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.
I do have those glyphs and it says there are no errors when I press F9, so I'm stumped.
Bhikkhu Pesala
Top Typographer
Top Typographer
Posts: 9890
Joined: Tue Oct 29, 2002 5:28 am
Location: Seven Kings, London UK
Contact:

Re: Ligature script error

Post by Bhikkhu Pesala »

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.
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.
My FontsReviews: MainTypeFont CreatorHelpFC15 + MT12.0 @ Win 10 64-bit build 19045.2486
tsalagimahariel
Posts: 18
Joined: Mon Jan 27, 2014 5:32 am

Re: Ligature script error

Post by tsalagimahariel »

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>
Bhikkhu Pesala
Top Typographer
Top Typographer
Posts: 9890
Joined: Tue Oct 29, 2002 5:28 am
Location: Seven Kings, London UK
Contact:

Re: Ligature script error

Post by Bhikkhu Pesala »

I did Tools, Sort font by code-point
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;
}
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
Skyrim Dragon test.png
Skyrim Dragon test.png (29.83 KiB) Viewed 7320 times
My FontsReviews: MainTypeFont CreatorHelpFC15 + MT12.0 @ Win 10 64-bit build 19045.2486
tsalagimahariel
Posts: 18
Joined: Mon Jan 27, 2014 5:32 am

Re: Ligature script error

Post by tsalagimahariel »

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.
Bhikkhu Pesala
Top Typographer
Top Typographer
Posts: 9890
Joined: Tue Oct 29, 2002 5:28 am
Location: Seven Kings, London UK
Contact:

Re: Ligature script error

Post by Bhikkhu Pesala »

As I said above, but it makes no difference — your original project file also works just the same:
Bhikkhu Pesala wrote:I did Tools, Sort font by code-point
Font Properties, Ranges, Calculate, Code-pages calculate:
Try Help, Check for Updates to see if you have the latest version.
My FontsReviews: MainTypeFont CreatorHelpFC15 + MT12.0 @ Win 10 64-bit build 19045.2486
Post Reply