mhosken 7a0c5e1ca2 Add fea generation support (#776)
* First round of adding fea output

No format tests but all test files give reasonable output so far.

* Get existing tests working

* Initial tests that work for fea2fea

* Get more tests working

Bug fixes and re-layout some tests to compare with fea2fea output.
Ranges and name parameters are not optimised yet.

* Handle vertical default values in fea2fea

* Hide fea2fea differences in lookupflags

* No reduce() in py3 so use a for loop
2016-12-20 11:10:29 +01:00

27 lines
1.1 KiB
Plaintext

# OpenType Feature File specification, section 5.d, example 1.
# http://www.adobe.com/devnet/opentype/afdko/topic_feature_file_syntax.html
feature F1 {
sub [one one.oldstyle] [slash fraction] [two two.oldstyle] by onehalf;
} F1;
# Since the OpenType specification does not allow ligature substitutions
# to be specified on target sequences that contain glyph classes, the
# implementation software will enumerate all specific glyph sequences
# if glyph classes are detected in <glyph sequence>. Thus, the above
# example produces an identical representation in the font as if all
# the sequences were manually enumerated by the font editor:
feature F2 {
sub one slash two by onehalf;
sub one.oldstyle slash two by onehalf;
sub one fraction two by onehalf;
sub one.oldstyle fraction two by onehalf;
sub one slash two.oldstyle by onehalf;
sub one.oldstyle slash two.oldstyle by onehalf;
sub one fraction two.oldstyle by onehalf;
sub one.oldstyle fraction two.oldstyle by onehalf;
} F2;
# In the resulting OpenType GSUB table (spec5d1.ttx),
# we expect to see only one single lookup.