technically we are tweaking the original example from the spec but it keeps the spirit, so that the product of glyph classes produces the same representation in the font as if the sequences were manually enumerated (while keeping the declaration order)
24 lines
1005 B
Plaintext
24 lines
1005 B
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] [fraction slash] [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 fraction two by onehalf;
|
|
sub one fraction two.oldstyle by onehalf;
|
|
sub one slash two by onehalf;
|
|
sub one slash two.oldstyle by onehalf;
|
|
sub one.oldstyle fraction two by onehalf;
|
|
sub one.oldstyle fraction two.oldstyle by onehalf;
|
|
sub one.oldstyle slash two by onehalf;
|
|
sub one.oldstyle slash two.oldstyle by onehalf;
|
|
} F2;
|