Strange happenings in liga feature when opening generated OTF in FL5
Something weird's going on with my fonts: if I open a font that has been generated, and passed trough autohint, the contents of the liga feature changes, and FL5 refuses to compile (Fatal Error). This seems to be sticky, so fonts opened afterwards acquire the same problem (or I might just be going nuts). The only real change other than numberin simplified seems to be that "script dflt;" becomes "script ;"
Is it another of the FL5 little surprises or does autohint simplify/edit liga? Please see transcript below:
Before:
feature liga { # Standard Ligatures
# Latin
lookup liga16 {
sub f f i by ffi;
sub f i by fi;
} liga16;
lookup liga17 {
sub f f j by f_f_j;
sub f f l by ffl;
sub f f by ff;
sub f j by f_j;
sub f l by fl;
} liga17;
language AZE exclude_dflt; # Azeri
lookup liga17;
language CRT exclude_dflt; # Crimean Tatar
lookup liga17;
language MOL ; # Moldavian
language ROM ; # Romanian
language TRK exclude_dflt; # Turkish
lookup liga17;
script dflt;
lookup liga16;
lookup liga17;
} liga;
After generating OTF and passing through FDK autohint:
feature liga { # Standard Ligatures
# Latin
lookup liga1 {
sub f f i by ffi;
sub f i by fi;
} liga1;
lookup liga2 {
sub f f j by f_f_j;
sub f f l by ffl;
sub f f by ff;
sub f j by f_j;
sub f l by fl;
} liga2;
language AZE exclude_dflt; # Azeri
lookup liga2;
language CRT exclude_dflt; # Crimean Tatar
lookup liga2;
language MOL ; # Moldavian
language ROM ; # Romanian
language TRK exclude_dflt; # Turkish
lookup liga2;
script ;
lookup liga1;
lookup liga2;
} liga;




24.Jun.2009 1.18am
Mind that the AFDKO feature file syntax as used in FLS5 and FM is a higher level language and does not match binary layout tables one-to-one. There is some "translation" involved which shows when you re-import layout tables. With some lookup types, differences are more drastic than in your example.
The "dflt" (lowercase) keyword is only used in combination with "language". The default "script" is designated by "DFLT" (uppercase).
If you want to address "script DFLT", you need to run FLS5-generated .otfs or .ttfs through Adam Twardoch's script Fix DFLT Script Tag. (He also made helpful remarks about script DFLT in a more recent Typophile discussion, you need to google for it.)
24.Jun.2009 2.45am
Thanks, Karsten. I'll thank you properly when I shall have understood this and had fixed it. Strewth, I'm out of me depth!
25.Jun.2009 6.52pm
I still have some mischief in there somewhere. I tried to install the Fix DFLT ... script but no luck so far:
Locating OpenType fonts in /Users/Jan/process...
Traceback (most recent call last):
File "", line 108, in ?
File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/codecs.py", line 205, in __getattr__
AttributeError: stdout_hook instance has no attribute 'flush'
I installed Python 2.6.2 as well. What is NumPy, btw?
25.Jun.2009 7.54pm
Numpy is a set of Python libraries. If you install the big Robofab package it includes Numpy.
25.Jun.2009 11.44pm
Oh bugger. Now my Python is too new for Robofab. It says I need 2.3. My brand new Numpy is the wrong version too (MAC OS 1.5, I am still running Leopard (10.4) on iMac 1.8 PowerPC G5). Help, squeek?
26.Jun.2009 1.14am
Sorry about this mess: now I have installed Python 2.5.4, installed numpy 1.3.0, all's well, the script still does not run.
26.Jun.2009 11.46pm
Thanks to Karsten, the script now works. The best way to install the Python and NumPy to make this work:
http://www.robofab.org/install.html
1.Jul.2009 12.37pm
paragraph
You can decompile the GSUB-table of your Font, generated with FontLab. Autohint the font with the AFDKO and then merge the decompiled GSUB-table back into the autohinted font. But somehow I doubt, that the autohint program messes up the GSUB-table. However, it is worth to try. I often correct fonts in this way, when I want to keep changes at the minimum.
1.Jul.2009 6.17pm
Thanks, Arno. It is clearly a FLS5 bug, nothing to do with ADFKO.