Module: Fontisan::Ufo::Compile::FeatureWriters

Defined in:
lib/fontisan/ufo/compile/feature_writers.rb,
lib/fontisan/ufo/compile/feature_writers/base.rb,
lib/fontisan/ufo/compile/feature_writers/curs.rb,
lib/fontisan/ufo/compile/feature_writers/gdef.rb,
lib/fontisan/ufo/compile/feature_writers/kern.rb,
lib/fontisan/ufo/compile/feature_writers/mark.rb,
lib/fontisan/ufo/compile/feature_writers/mkmk.rb,
lib/fontisan/ufo/compile/feature_writers/kern2.rb,
lib/fontisan/ufo/compile/feature_writers/mark_family_base.rb

Overview

Feature writers extract GSUB/GPOS feature data from a UFO source. Each writer is a class extending Base with a #write method that returns a FeatureOutput value object (or nil if the UFO has no data for that feature).

The compiler runs registered writers, collects their outputs, and feeds each into the corresponding table builder (Tables::Gpos, Tables::Gsub, etc.) for binary encoding.

OCP: adding a new feature writer = new class + one REGISTRY entry. No edits to the compiler.

Defined Under Namespace

Classes: Base, Curs, FeatureOutput, Gdef, Kern, Kern2, Mark, MarkFamilyBase, Mkmk

Constant Summary collapse

DEFAULT_WRITERS =

Default writer set — what the compiler runs when the user doesn't override. Per feature, #write returns nil when the UFO has no data for that feature, so it's safe to always run them all. Order matters: Gdef first (so later writers can rely on glyph classification), then position features (kern, mark, mkmk, curs).

[Gdef, Kern, Mark, Mkmk, Curs].freeze