Repository navigation
v2.0.0
Features
- Try to read
SOURCE_DATE_EPOCHvariable from the environment if the
openTypeHeadCreatedis not set in fontinfo.plist (#199). - Added optional
FlattenComponentsFilterto un-nest composite glyphs (#214). - Added optional
PropagateAnchorsFilterto recursively copy all anchors from
the components' base glyphs to the composite glyph that reference them (#223).
NOTE: the anchor propagation for composite ligature glyphs is problematic and
may change in future versions. - Optimize CFF table's size by choosing optimal default/nominalWidthX (#227,
#216). - No longer write a fallback value for the CFF
Weightoperator in TopDict if
postscriptWeightNameis not set in fontinfo.plist. The value is not
required in the CFF spec (#239). - Changed feature writers API to update a pre-parsed
feaLib.ast.FeatureFile
Abstract Syntax Tree (AST) object, instead of generating strings. See this
#255 (comment), as
well as the inline docstrings for the BaseFeatureWriter class for more
information (#255). - The old
FeatureCompilerclass has been split into anMTIFeatureCompiler
for MTI features, and aFeatureCompilerfor Adobe FDK features only; the
previous name was kept for backward compatibility. - The
FeatureCompilernow loads custom feature writers as specified in the
UFO lib under a special key "com.github.googlei18n.ufo2ft.featureWriters".
This is a plist array of dictionary elements; each dict has a required
"class" name, an optional "module" and "options" (dictionary) that are
passed as keyword arguments to the class constructor. These can be used
to override the default feature writers' configuration or load custom
feature writer modules. An empty array disables auto-features generation. - Removed deprecated
kernWriterClassandmarkWriterClassarguments in
top-level compile functions. Replaced by an equivalentfeatureWriters
argument: an optional list of feature writer classes or pre-initialized
instances that overrides both the default writer classes and the ones
specified in the UFO lib. KernFeatureWriterwas rewritten to support the new AST-based approach, and
to implement some new features, including: support for Indic-specificdist
feature; improved the algorithm for splitting RTL and LTR kerning lookups,
using the fonttools subsetter's to perform a closure over the GSUB table
and resolve LTR/RTL glyph alternates; Arabic numerals are now correctly kerned
from left to right following their BiDi type, while added only to the RTL
lookup (#255, #176, #198).MarkFeatureWriterwas rewritten from scratch, and now supports
Indic-specificabvmandblwmfeatures (#257, #179).- Use the UFO's path to resolve the relative
includestatements in features,
not the embedded features.fea file itself (unified-font-object/ufo-spec#55,
googlefonts/fontmake#157). - Added
compileFeaturesfunction that takes a UFO and compile the OTL
features into either an existing TTFont object, or creates a new TTFont only
containing the newly built OTL tables. - The
OS/2.usMaxContextcalculation was moved from theFeatureCompilerto
thePostProcessorclass, so that compiler can build OTL tables even for
an emptyTTFontobject containing no "OS/2" table. - If
openTypeOS2UnicodeRangesandopenTypeOS2CodePageRangesare not set in
the fontinfo.plist, fallback values are calculated based on the font's Unicode
cmap coverage following the same algorithm as FontForge (#254). - PreProcessor now stores the cu2qu "quadratic" curve type (when running inplace),
and check its presence to avoid re-running the cubic to quadratic conversion on
a font that already has the required curve type. - The
PostProcessorclass now also supports the Glyphs.app-specific UFO lib key
"Don't use Production Names" as an alternative method to disable renaming
glyphs to production names. The recommended method is to set the ufo2ft's own
lib key: "com.github.googlei18n.ufo2ft.useProductionNames" (True by default).
Bugfixes
- Make builds reproducible by using
calendar.timegmto convert UTC time tuple
to Unix timestamp, andtime.gmtimeto get seconds since epoch in UTC.
Datetimes in UFO must be interpreted as UTC, not local time
(unified-font-object/ufo-spec#54, #219, #221). - Don't fail with negative advances that will be rounded to 0 (#222,
googlefonts/fontmake#400). - Don't set CID-only
FontNameoperator in CFF TopDict (#234). - Don't fail if all glyphs have zero advance width (#249).
- Disallow multiple glyphs mapping to the same unicode codepoint. We now take
the first glyph found in the glyph order, and print a warning if duplicates
are found with the same unicode value (#213). - Use
hhea.ascenderinstead of the glyph's height as fallback for the
verticalOrigin(#233, #231).
Updated minimum requirements
- fonttools >= 3.27.1
- defcon >= 0.4.0
- cu2qu >= 1.5.0
- booleanOperations >= 0.8.0