Adobe specifies the syntax for their feature files. Sadly this syntax is not adequate for specifying all of OpenType.
anonymous
" tables. I can't
figure out from the spec how they should be dealt with.
Font
Info->Lookups->(popup menu)->Add 'aalt' features
)
Adobe tells me there is a new version of the FDK coming out later this summer (2007) which will address these issues.
When FontForge finds a contextual lookup for which there is no syntax, it will describe the controlled lookup in its own lookup block, and provide a pointer to that lookup in the contextual.
So, suppose you wanted a contextual lookup to decompose the "ff" ligature. This might be desireable when outputting hex numbers. FontForge would produce:
lookup ff_decomp_nested { subs ff by f f } ff_decomp_nested; @hexdigits=[zero one two three four five six seven eight nine a-f] subs @hexdigits ff' by <lookup ff_decomp_nested> subs ff' @hexdigits by <lookup ff_decomp_nested>
Use File->Merge Feature Info
(formerly File->Merge Kern Info
)
Use Element->Font
Info->Lookups
, then right click on any lookup (to produce a
popup menu) and select Save Feature File
You can also generate a feature file containing a single lookup by selecting
that lookup, producing the popup menu and selecting Save Lookup
# GSUB lookup idecomposition { lookupflag 0; sub i' [acutecomb gravecomb ] by dotlessi ; sub i' dotbelowcomb [acutecomb gravecomb ] by dotlessi ; } idecomposition; lookup Numericsuperscripts { lookupflag 0; sub zero by zero.superior ; sub one by onesuperior ; ... (substitutions omitted) sub nine by nine.superior ; } Numericsuperscripts; lookup smcpLowercasetoSmallCapitalsinL { lookupflag 0; sub a by a.sc ; sub b by b.sc ; ... (substitutions omitted) sub z by z.sc ; } smcpLowercasetoSmallCapitalsinL; lookup ligaStandardLigaturesinLatinloo { lookupflag 0; sub f i by fi; sub f l by fl; sub f f by ff; sub f f i by ffi; sub f f l by ffl; } ligaStandardLigaturesinLatinloo; lookup dligDiscretionaryLigaturesinLat { lookupflag 0; sub c h by c_h; sub c t by c_t; sub f b by f_b; sub f r by f_r; sub f t by f_t; sub longs h by longs_h; sub s h by s_h; sub longs i by longs_i; sub longs l by longs_l; sub longs longs by longs_longs; sub longs longs i by longs_longs_i; sub longs longs l by longs_longs_l; sub longs t by longs_t; sub s t by s_t; sub I J by IJ; sub i j by ij; } dligDiscretionaryLigaturesinLat; lookup fracDiagonalFractionslookup3 { lookupflag 0; sub one slash two by onehalf; sub one fraction two by onehalf; sub one slash four by onequarter; sub one fraction four by onequarter; sub three slash four by threequarters; sub three fraction four by threequarters; } fracDiagonalFractionslookup3; feature \mark { script DFLT; language dflt ; lookup idecomposition; script latn; language dflt ; lookup idecomposition; } \mark; feature subs { script DFLT; language dflt ; lookup Numericsuperscripts; script cyrl; language dflt ; lookup Numericsuperscripts; script grek; language dflt ; lookup Numericsuperscripts; script latn; language dflt ; lookup Numericsuperscripts; } subs; feature sups { script DFLT; language dflt ; lookup Numericsuperscripts; script cyrl; language dflt ; lookup Numericsuperscripts; script grek; language dflt ; lookup Numericsuperscripts; script latn; language dflt ; lookup Numericsuperscripts; } sups; feature smcp { script latn; language dflt ; lookup smcpLowercasetoSmallCapitalsinL; } smcp; feature liga { script latn; language dflt ; lookup ligaStandardLigaturesinLatinloo; } liga; feature dlig { script latn; language dflt ; lookup dligDiscretionaryLigaturesinLat; } dlig; feature frac { script DFLT; language dflt ; lookup fracDiagonalFractionslookup3; } frac; # GPOS lookup LatinMarks { lookupflag 0; mark dotbelowcomb <anchor -164 -45>; pos a <anchor 207 -54> mark [dotbelowcomb ]; pos e <anchor 222 -54> mark [dotbelowcomb ]; pos i <anchor 60 -54> mark [dotbelowcomb ]; pos o <anchor 165 -54> mark [dotbelowcomb ]; pos u <anchor 213 -54> mark [dotbelowcomb ]; pos dotlessi <anchor 60 -54> mark [dotbelowcomb ]; mark acutecomb <anchor -163 598>; mark gravecomb <anchor -108 598>; pos a <anchor 180 558> mark [acutecomb gravecomb ]; pos e <anchor 180 558> mark [acutecomb gravecomb ]; pos o <anchor 180 558> mark [acutecomb gravecomb ]; pos u <anchor 164 558> mark [acutecomb gravecomb ]; pos dotlessi <anchor 68 558> mark [acutecomb gravecomb ]; } LatinMarks; lookup Subscriptadjustmenttosuperscrip { lookupflag 0; pos onesuperior <0 -850 0 0>; pos threesuperior <0 -850 0 0>; ... (positionings omitted) pos six.superior <0 -850 0 0>; } Subscriptadjustmenttosuperscrip; lookup kernHorizontalKerninginLatinloo { lookupflag 0; pos T u -109; pos T o -103; pos T e -121; pos T a -97; pos V e -36; pos W u -30; pos W o -42; pos W e -48; pos X u -97; pos Y u -48; pos Y o -73; pos Y e -60; pos Y a -54; } kernHorizontalKerninginLatinloo; feature \mark { script DFLT; language dflt ; lookup LatinMarks; script latn; language dflt ; lookup LatinMarks; } \mark; feature subs { script DFLT; language dflt ; lookup Subscriptadjustmenttosuperscrip; script cyrl; language dflt ; lookup Subscriptadjustmenttosuperscrip; script grek; language dflt ; lookup Subscriptadjustmenttosuperscrip; script latn; language dflt ; lookup Subscriptadjustmenttosuperscrip; } subs; feature kern { script latn; language dflt ; lookup kernHorizontalKerninginLatinloo; } kern;