Skip to content

v2.0.0

Compare
Choose a tag to compare
@anthrotype anthrotype released this 12 Jun 19:01
v2.0.0
b0bba85

Features

  • Try to read SOURCE_DATE_EPOCH variable from the environment if the
    openTypeHeadCreated is not set in fontinfo.plist (#199).
  • Added optional FlattenComponentsFilter to un-nest composite glyphs (#214).
  • Added optional PropagateAnchorsFilter to 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 Weight operator in TopDict if
    postscriptWeightName is 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 FeatureCompiler class has been split into an MTIFeatureCompiler
    for MTI features, and a FeatureCompiler for Adobe FDK features only; the
    previous name was kept for backward compatibility.
  • The FeatureCompiler now 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 kernWriterClass and markWriterClass arguments in
    top-level compile functions. Replaced by an equivalent featureWriters
    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.
  • KernFeatureWriter was rewritten to support the new AST-based approach, and
    to implement some new features, including: support for Indic-specific dist
    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).
  • MarkFeatureWriter was rewritten from scratch, and now supports
    Indic-specific abvm and blwm features (#257, #179).
  • Use the UFO's path to resolve the relative include statements in features,
    not the embedded features.fea file itself (unified-font-object/ufo-spec#55,
    googlefonts/fontmake#157).
  • Added compileFeatures function 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.usMaxContext calculation was moved from the FeatureCompiler to
    the PostProcessor class, so that compiler can build OTL tables even for
    an empty TTFont object containing no "OS/2" table.
  • If openTypeOS2UnicodeRanges and openTypeOS2CodePageRanges are 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 PostProcessor class 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.timegm to convert UTC time tuple
    to Unix timestamp, and time.gmtime to 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 FontName operator 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.ascender instead 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