Releases: googlefonts/ufo2ft
Releases · googlefonts/ufo2ft
v2.1.0
v2.0.2
- Bumped minimum required fonttools >= 3.28.
Fixes fonttools/fonttools#1275
v2.0.1
v2.0.0
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 anMTIFeatureCompiler
for MTI features, and aFeatureCompiler
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
andmarkWriterClass
arguments 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. KernFeatureWriter
was 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).MarkFeatureWriter
was rewritten from scratch, and now supports
Indic-specificabvm
andblwm
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 theFeatureCompiler
to
thePostProcessor
class, so that compiler can build OTL tables even for
an emptyTTFont
object containing no "OS/2" table. - If
openTypeOS2UnicodeRanges
andopenTypeOS2CodePageRanges
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, andtime.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
v2.0.0.dev0
Pre-release for the upcoming ufo2ft 2.0. Full detailed changelog coming in the final release.
v1.1.0
- Read private 'useProductionNames' key from UFO lib. When this key is missing, it is implied to be True (same as the current default behavior): i.e.
post
glyph names are renamed based onpublic.postscriptNames
if present, elseuniXXXX
names are auto-generated from the glyphs'unicode
values.
If the key is set to False, then thepost
glyph names are not modified (#186).
v1.0.0
- Added new
ufo2ft.featureWriters
package defining a new interface for generic feature writers.
Moved the two current default writers to the new package but temporarily kept the old modules as aliases.
Theufo2ft.compile*
functions now also take a newfeatureWriters
list of classes providing the same interface as BaseFeatureWriter, or also feature writer instances pre-loaded with custom options. - [fontInfoData] Addded fallback for hhea
caretSlopeRise
andcaretSlopeRun
to match makeotf (#177). - [ufo2ft] Added
compileInterpolatableTTFs
function to create interpolatable TTFs using cu2qu algorithm. - Added new
ufo2ft.filters
package for pre-processing UFO glyphs before compilation. Contains four filter implementations: "Decompose Components", "Remove Overlaps", "Cubic To Quadratic", and "Transformations".
Filters are specified with a special element in the UFO lib.plist. The key is "com.github.googlei18n.ufo2ft.filters", and the value is an array of plist dictionaries containing the filter "name", an optional "namespace" from which the filter module is to be imported from (the default is"ufo2ft.filters"
), an array of "args" and a dict of "kwargs" which are passed on to the filter class's constructor, and finally either an "include" or an "exclude" array of glyph names to select the glyphs that are to be filtered.
The three core filters can also be toggled on/off with appropriate arguments to compileOTF/TTF functions, whereas the "Transformations" filter can only be specified via lib key.
The latter is intended to work in the same way as Glyphs.app's "Transformations" filter. However, currently it
only supports translate, scale and slant operatations. - [ufo2ft] Added
reverseDirection=True
argument to compileTTF to optionally disable reversing path orientation when running cu2qu. - [ufo2ft] Added
removeOverlaps=False
argument to compileOTF/TTF. Requires booleanOperations >= 0.7.1:
https://pypi.python.org/pypi/booleanOperations - [ufo2ft] Added
inplace=False
argument to compileOTF/TTF. By default, the pre-processor copies the glyphs before applying any filters. If you don't care about the input font object being modified by compilation, you can useinplace=True
. - [ufo2ft] Removed deprecated
mtiFeaFiles
argument to compileOTF/TTF; the only supported way to compile MTI features is to embed them inside the UFO data folder. - [outlineCompiler] Round head values that may be float in UFO (#155).
- [outlineCompiler] Adds an empty zero-contour TTGlyph if the UFO glyph has invalid curveTo segments (e.g.
convertCubics
was set to False), and logs a warning instead of raising exception.
v0.6.2
Bump minimum required versions of dependencies: - fonttools >= 3.15.0 - ufoLib >= 2.1.0 - cu2qu >= 1.2.0 - defcon >= 0.3.4 - compreffor >= 0.4.5
v0.6.1
- Use preferred family and subfamily to compose the full name; make UniqueID fallback less verbose (#148). - Use the same default approximation error as cu2qu and fontmake (c1b090a). - Import and merge any TTX found in `data/com.github.fonttools.ttx` in the generated OpenType font (#142). - Round `unitsPerEm` (#151).
v0.5.3
- [featureCompiler] Only writeFeatures_mark if neither mark or mkmk is present. - [install_requires] Update minimum required fonttools to 3.13.0.