Customize feature generation with feature writers
mainFeature writers control how kerning and anchor rules from design sources are converted into explicit OpenType features.
Configuration Methods:
- UFO lib: Add entries to the
com.github.googlei18n.ufo2ft.featureWriterskey. - Command Line: Use the
--feature-writerflag. Use--feature-writer "None"to disable all automatic feature generation.
Common Options:
All feature writers support a mode parameter:
skip(default): Skips writing the feature if it already exists in the source. Note: If the source contains the magic string# Automatic Code,fontmakewill insert generated code at that location even inskipmode.append: Appends the generated rules to the existing feature code.
<!-- Example: Configuring KernFeatureWriter to append rules in a UFO lib.plist -->
<key>com.github.googlei18n.ufo2ft.featureWriters</key>
<array>
<dict>
<key>class</key>
<string>KernFeatureWriter</string>
<key>options</key>
<dict>
<key>mode</key>
<string>append</string>
</dict>
</dict>
</array>