- Fixed typo in varLib/merger.py that causes NameError merging COLR glyphs containing more than 255 layers (#2685).
- [designspaceLib] Don't make up bad PS names when no STAT data (#2684)
- [varStore/subset] fixed KeyError exception to do with NO_VARIATION_INDEX while subsetting varidxes in GPOS/GDEF (a08140d).
- [instancer] When optimizing HVAR/VVAR VarStore, use_NO_VARIATION_INDEX=False to avoid including NO_VARIATION_INDEX in AdvWidthMap, RsbMap, LsbMap mappings, which would push the VarIdx width to maximum (4bytes), which is not desirable. This also fixes a hard crash when attempting to subset a varfont after it had been partially instanced with use_NO_VARIATION_INDEX=True.
- [instancer] Set RIBBI bits in head and OS/2 table when cutting instances and the subfamily nameID=2 contains strings like 'Italic' or 'Bold' (#2673).
- [otTraverse] Addded module containing methods for traversing trees of otData tables (#2660).
- [otTables] Made DeltaSetIndexMap TTX dump less verbose by omitting no-op entries (#2660).
- [colorLib.builder] Added option to disable PaintColrLayers's reuse of layers from LayerList (#2660).
- [varLib] Added support for merging multiple master COLRv1 tables into a variable COLR table (#2660, #2328). Base color glyphs of same name in different masters must have identical paint graph structure (incl. number of layers, palette indices, number of color line stops, corresponding paint formats at each level of the graph), but can differ in the variable fields (e.g. PaintSolid.Alpha). PaintVar* tables are produced when this happens and a VarStore/DeltaSetIndexMap is added to the variable COLR table. It is possible for non-default masters to be 'sparse', i.e. omit some of the color glyphs present in the default master.
- [feaLib] Let the Parser set nameIDs 1 through 6 that were previously reserved (#2675).
- [varLib.varStore] Support NO_VARIATION_INDEX in optimizer and instancer.
- [feaLib] Show all missing glyphs at once at end of parsing (#2665).
- [varLib.iup] Rewrite force-set conditions and limit DP loopback length (#2651). For Noto Sans, IUP time drops from 23s down to 9s, with only a slight size increase in the final font. This basically turns the algorithm from O(n^3) into O(n).
- [featureVars] Report about missing glyphs in substitution rules (#2654).
- [mutator/instancer] Added CLI flag to --no-recalc-timestamp (#2649).
- [SVG] Allow individual SVG documents in SVG OT table to be compressed on uncompressed,
and remember that when roundtripping to/from ttx. The SVG.docList is now a list
of SVGDocument namedtuple-like dataclass containing an extra
compressedfield, and no longer a bare 3-tuple (#2645). - [designspaceLib] Check for descriptor types with hasattr() to allow custom classes that don't inherit the default descriptors (#2634).
- [subset] Enable sharing across subtables of extension lookups for harfbuzz packing (#2626). Updated how table packing falls back to fontTools from harfbuzz (#2668).
- [subset] Updated default feature tags following current Harfbuzz (#2637).
- [svgLib] Fixed regex for real number to support e.g. 1e-4 in addition to 1.0e-4. Support parsing negative rx, ry on arc commands (#2596, #2611).
- [subset] Fixed subsetting SinglePosFormat2 when ValueFormat=0 (#2603).
- [designspaceLib] Fixed typo in
deepcopyExceptFontsmethod, preventing font references to be transferred (#2600). Fixed another typo in the name ofRangedataclass's__post_init__magic method (#2597).
- [otBase] Make logging less verbose when harfbuzz fails to serialize. Do not exit
at the first failure but continue attempting to fix offset overflow error using
the pure-python serializer even when the
USE_HARFBUZZ_REPACKERoption was explicitly set toTrue. This is normal with fonts with relatively large tables, at least until hb.repack implements proper table splitting.
- [otlLib] Put back the
FONTTOOLS_GPOS_COMPACT_MODEenvironment variable to fix regression in ufo2ft (and thus fontmake) introduced with v4.33.0 (#2592, #2593). This is deprecated and will be removed one ufo2ft gets updated to use the new config setup.
- [OS/2 / merge] Automatically recalculate
OS/2.xAvgCharWidthafter merging fonts withfontTools.merge(#2591, #2538). - [misc/config] Added
fontTools.misc.configToolsmodule, a generic configuration system (#2416, #2439). AddedfontTools.configmodule, a fontTools-specific configuration system usingconfigToolsabove. Attached aConfigobject toTTFont. - [otlLib] Replaced environment variable for GPOS compression level with an equivalent option using the new config system.
- [designspaceLib] Incremented format version to 5.0 (#2436).
Added discrete axes, variable fonts, STAT information, either design- or
user-space location on instances.
Added
fontTools.designspaceLib.splitmodule to split a designspace into sub-spaces that interpolate and that represent the variable fonts listed in the document. Made instance names optional and allow computing them from STAT data instead. AddedfontTools.designspaceLib.statNamesmodule. Allow instances to have the same location as a previously defined STAT label. Deprecated some attributes:SourceDescriptor:copyLib,copyInfo,copyGroups,copyFeatures.InstanceDescriptor:kerning,info;glyphs: use rules or sparse sources. For both,location: use the more explicit designLocation. Note: all are soft deprecations and existing code should keep working. Updated documentation for Python methods and the XML format. - [varLib] Added
build_manyto build several variable fonts from a single designspace document (#2436). AddedfontTools.varLib.statmodule to build STAT tables from a designspace document. - [otBase] Try to use the Harfbuzz Repacker for packing GSUB/GPOS tables when
uharfbuzzpython bindings are available (#2552). Disable it by setting the "fontTools.ttLib.tables.otBase:USE_HARFBUZZ_REPACKER" config option toFalse. If the option is set explicitly toTruebutuharfbuzzcan't be imported or fails to serialize for any reasons, an error will be raised (ImportError or uharfbuzz errors). - [CFF/T2] Ensure that
pen.closePath()gets called for CFF2 charstrings (#2577). Handle implicit CFF2 closePath withinT2OutlineExtractor(#2580).
- [otlLib] Disable GPOS7 optimization to work around bug in Apple CoreText. Always force Chaining GPOS8 for now (#2540).
- [glifLib] Added
outputImpliedClosingLine=Falseparameter toGlyph.draw(), to control behaviour ofPointToSegmentPen(6b4e2e7). - [varLib.interpolatable] Check for wrong contour starting point (#2571).
- [cffLib] Remove leftover
GlobalStateclass and fix calls toTopDictIndex()(#2569, #2570). - [instancer] Clear
AxisValueArrayif it is empty after instantiating (#2563).
- [varLib] fix instantiation of GPOS SinglePos values (#2555).
- [subset] fix subsetting OT-SVG when glyph id attribute is on the root
<svg>element (#2553).
- [ttCollection] Fixed 'ResourceWarning: unclosed file' warning (#2549).
- [varLib.merger] Handle merging SinglePos with valueformat=0 (#2550).
- [ttFont] Update glyf's glyphOrder when calling TTFont.setGlyphOrder() (#2544).
- [ttFont] Added
ensureDecompiledmethod to load all tables irrespective of thelazyattribute (#2551). - [otBase] Added
iterSubTablemethod to iterate over BaseTable's children of type BaseTable; useful for traversing a tree of otTables (#2551).
- [varLib] Added debug logger showing the glyph name for which
gvaris built (#2542). - [varLib.errors] Fixed undefined names in
FoundANoneandUnsupportedFormatexceptions (ac4d5611). - [otlLib.builder] Added
windowsNamesandmacNames(bool) parameters to thebuildStatTabefunction, so that one can select whether to only add one or both of the two sets (#2528). - [t1Lib] Added the ability to recreate PostScript stream (#2504).
- [name] Added
getFirstDebugName,getBest{Family,SubFamily,Full}Namemethods (#2526).
- [colorLib] Fixed rounding issue with radial gradient's start/end circles inside one another (#2521).
- [freetypePen] Handle rotate/skew transform when auto-computing width/height of the buffer; raise PenError wen missing moveTo (#2517)
- [ufoLib] Fixed illegal characters and expanded reserved filenames (#2506).
- [COLRv1] Don't emit useless PaintColrLayers of lenght=1 in LayerListBuilder (#2513).
- [ttx] Removed legacy
waitForKeyPressmethod on Windows (#2509). - [pens] Added FreeTypePen that uses
freetype-pyand the pen protocol for rasterizating outline paths (#2494). - [unicodedata] Updated the script direction list to Unicode 14.0 (#2484). Bumped unicodedata2 dependency to 14.0 (#2499).
- [psLib] Fixed type of
fontNameinsuckfont(#2496).
- [svgPathPen] Continuation of #2471: make sure all occurrences of
str()are now replaced with user-definedntoscallable. - [merge] Refactored code into submodules, plus several bugfixes and improvements: fixed duplicate-glyph-resolution GSUB-lookup generation code; use tolerance in glyph comparison for empty glyph's width; ignore space of default ignorable glyphs; downgrade duplicates-resolution missing-GSUB from assert to warn; added --drop-tables option (#2473, #2475, #2476).
- [merge] Merge GDEF marksets in Lookups properly (#2474).
- [feaLib] Have
fontTools feaLibscript exit with error code when build fails (#2459) - [svgPathPen] Added
ntosoption to customize number formatting (e.g. rounding) (#2471). - [subset] Speed up subsetting of large CFF fonts (#2467).
- [otTables] Speculatively promote lookups to extension to speed up compilation. If the offset to lookup N is too big to fit in a ushort, the offset to lookup N+1 is going to be too big as well, so we promote to extension all lookups from lookup N onwards (#2465).
- [subset] Fixed bug while subsetting
COLRtable, whereby incomplete layer records pointing to missing glyphs were being retained leading tostruct.errorupon compiling. Make it so thatglyfglyph closure, which follows theCOLRglyph closure, does not influence theCOLRtable subsetting (#2461, #2462). - [docs] Fully document the
cmapandglyftables (#2454, #2457). - [colorLib.unbuilder] Fixed CLI by deleting no longer existing parameter (180bb1867).
- [otlLib] Remove duplicates when building coverage (#2433).
- [docs] Add interrogate configuration (#2443).
- [docs] Remove comment about missing “start” optional argument to
calcChecksum(#2448). - [cu2qu/cli] Adapt to the latest ufoLib2.
- [subset] Support subsetting SVG table and remove it from the list of drop by default tables (#534).
- [subset] add
--pretty-svgoption to pretty print SVG table contents (#2452). - [merge] Support merging
CFFtables (CID-keyedCFFis still not supported) (#2447). - [merge] Support
--output-file(#2447). - [docs] Split table docs into individual pages (#2444).
- [feaLib] Forbid empty classes (#2446).
- [docs] Improve documentation for
fontTools.ttLib.ttFont(#2442).
- [subset] Fixed AttributeError while traversing a color glyph's Paint graph when there is no LayerList, which is optional (#2441).
- Dropped support for EOL Python 3.6, require Python 3.7 (#2417).
- [ufoLib/glifLib] Make filename-clash checks faster by using a set instead of a list (#2422).
- [subset] Don't crash if optional ClipList and LayerList are
None(empty) (#2424, 2439). - [OT-SVG] Removed support for old deprecated version 1 and embedded color palettes, which were never officially part of the OpenType SVG spec. Upon compile, reuse offsets to SVG documents that are identical (#2430).
- [feaLib] Added support for Variable Feature File syntax. This is experimental and subject to change until it is finalized in the Adobe FEA spec (#2432).
- [unicodedata] Update Scripts/ScriptExtensions/Blocks to UnicodeData 14.0 (#2437).
- [otlLib] Fixed error when chained contextual lookup builder overflows (#2404, #2411).
- [bezierTools] Fixed two floating-point bugs: one when computing t for a point lying on an almost horizontal/vertical line; another when computing the intersection point between a curve and a line (#2413).
- [ttLib/otTables] Cleaned up virtual GID handling: allow virtual GIDs in
CoverageandClassDefreaders; removed unusedallowVIDargument fromTTFontconstructor, andrequireRealargument inTTFont.getGlyphIDmethod. MakeTTFont.setGlyphOrderclear reverse glyphOrder map, and assumeglyphOrderinternal attribute is never modified outside setGlyphOrder; addedTTFont.getGlyphNameManyandgetGlyphIDMany(#1536, #1654, #2334, #2398). - [py23] Dropped internal use of
fontTools.py23module to fix deprecation warnings in client code that imports from fontTools (#2234, #2399, #2400). - [subset] Fix subsetting COLRv1 clip boxes when font is loaded lazily (#2408).
- [otTables] Added missing
CompositeMode.PLUSoperator (#2390).
- [transform] Added
transformVectorandtransformVectorsmethods to theTransformclass. Similar totransformPointbut ignore the translation part (#2386).
- [xmlWriter] Default to
"\n"fornewlinestrinstead of platform-specificos.linesep(#2384). - [otData] Define COLRv1 ClipList and ClipBox (#2379).
- [removeOverlaps/instancer] Added --ignore-overlap-errors option to work around Skia PathOps.Simplify bug (#2382, #2363, google/fonts#3365).
- NOTE: This will be the last version to support Python 3.6. FontTools will require Python 3.7 or above from the next release (#2350)
- [COLRv1] Various changes to sync with the latest CORLv1 draft spec. In particular:
define COLR.VarIndexMap, remove/inline ColorIndex struct, add VarIndexBase to
PaintVar*tables (#2372); add reduced-precicion specialized transform Paints; define Angle as fraction of half circle encoded as F2Dot14; use FWORD (int16) for all Paint center coordinates; change PaintTransform to have an offset to Affine2x3; - [ttLib] when importing XML, only set sfntVersion if the font has no reader and is empty (#2376)
- [ttGlyphPen] Fixed bug in
TTGlyphPointPen, whereby open contours (i.e. starting with segmentType "move") would throwNotImplementedError. They are now treated as if they are closed, like with theTTGlyphPen(#2364, #2366).
- [tfmLib] Added new library for parsing TeX Font Metric (TFM) files (#2354).
- [TupleVariation] Make shared tuples order deterministic on python < 3.7 where Counter (subclass of dict) doesn't remember insertion order (#2351, #2353).
- [otData] Renamed COLRv1 structs to remove 'v1' suffix and match the updated draft
spec: 'LayerV1List' -> 'LayerList', 'BaseGlyphV1List' -> 'BaseGlyphList',
'BaseGlyphV1Record' -> 'BaseGlyphPaintRecord' (#2346).
Added 8 new
PaintScale*tables: with/without centers, uniform vs non-uniform. Added*AroundCentervariants toPaintRotateandPaintSkew: the default versions no longer have centerX/Y, but default to origin.PaintRotate,PaintSkewandPaintCompositeformats were re-numbered. NOTE: these are breaking changes; clients using the experimental COLRv1 API will have to be updated (#2348). - [pointPens] Allow
GuessSmoothPointPento accept a tolerance. Fixed call tomath.atan2with x/y parameters inverted. Sync the code with fontPens (#2344). - [post] Fixed parsing
posttable format 2.0 when it contains extra garbage at the end of the stringData array (#2314). - [subset] drop empty features unless 'size' with FeatureParams table (#2324).
- [otlLib] Added
otlLib.optimizemodule; added GPOS compaction algorithm. The compaction can be run on existing fonts withfonttools otlLib.optimizeor using the snippetcompact_gpos.py. There's experimental support for compacting fonts at compilation time using an environment variable, but that might be removed later (#2326).
- [subset/instancer] Fixed
AttributeErrorwhen instantiating a VF that contains GPOS ValueRecords withDevicetables but without the respective non-Device values (e.g.XAdvDevicewithoutXAdvance). When not explicitly set, the latter are assumed to be 0 (#2323).
- [otTables] Fixed
AttributeErrorin methods that split LigatureSubst, MultipleSubst and AlternateSubst subtables when an offset overflow occurs. TheFormatattribute was removed in v4.22.0 (#2319).
- [ttGlyphPen] Fixed typing annotation of TTGlyphPen glyphSet parameter (#2315).
- Fixed two instances of DeprecationWarning: invalid escape sequence (#2311).
- [subset] Fixed AttributeError when SinglePos subtable has None Value (ValueFormat 0) (#2312, #2313).
- [pens] Add
ttGlyphPen.TTGlyphPointPensimilar toTTGlyphPen(#2205).
- [subset] Fix
KeyErrorafter subsettingCOLRtable that initially contains both v0 and v1 color glyphs when the subset only requested v1 glyphs; we were not pruning the v0 portion of the table (#2308). - [colorLib] Set
LayerV1Listattribute toNonewhen empty, it's optional in CORLv1 (#2308).
- [designspaceLib] Allow to use
\\UNCabsolute paths on Windows (#2299, #2306). - [varLib.merger] Fixed bug where
VarLibMergeErrorwas raised with incorrect parameters (#2300). - [feaLib] Allow substituting a glyph class with
NULLto delete multiple glyphs (#2303). - [glyf] Fixed
NameErrorexception ingetPhantomPoints(#2295, #2305). - [removeOverlaps] Retry pathops.simplify after rounding path coordinates to integers if it fails the first time using floats, to work around a rare and hard to debug Skia bug (#2288).
- [varLib] Added support for building, reading, writing and optimizing 32-bit
ItemVariationStoreas used in COLRv1 table (#2285). - [otBase/otConverters] Add array readers/writers for int types (#2285).
- [feaLib] Allow more than one lookahead glyph/class in contextual positioning with "value at end" (#2293, #2294).
- [COLRv1] Default varIdx should be 0xFFFFFFFF (#2297, #2298).
- [pens] Make RecordingPointPen actually pass on identifiers; replace asserts with
explicit
PenErrorexception (#2284). - [mutator] Round lsb for CF2 fonts as well (#2286).
- [feaLib] Skip references to named lookups if the lookup block definition
is empty, similarly to makeotf. This also fixes an
AttributeErrorwhile generatingaaltfeature (#2276, #2277). - [subset] Fixed bug with
--no-hintingimplementation for Device tables (#2272, #2275). The previous code was alwyas dropping Device tables if no-hinting was requested, but some Device tables (DeltaFormat=0x8000) are also used to encode variation indices and need to be retained. - [otBase] Fixed bug in getting the ValueRecordSize when decompiling
MVARtable withlazy=True(#2273, #2274). - [varLib/glyf/gvar] Optimized and simplified
GlyphCoordinatesandTupleVariationclasses, usebytearraywhere possible, refactored phantom-points calculations. We measured about 30% speedup in total time of loading master ttfs, building gvar, and saving (#2261, #2266). - [subset] Fixed
AssertionErrorwhile pruning unused CPAL palettes when0xFFFFis present (#2257, #2259).
- [ttLib] Remove .Format from Coverage, ClassDef, SingleSubst, LigatureSubst, AlternateSubst, MultipleSubst (#2238). ATTENTION: This will change your TTX dumps!
- [misc.arrayTools] move Vector to its own submodule, and rewrite as a tuple subclass (#2201).
- [docs] Added a terminology section for varLib (#2209).
- [varLib] Move rounding to VariationModel, to avoid error accumulation from multiple deltas (#2214)
- [varLib] Explain merge errors in more human-friendly terms (#2223, #2226)
- [otlLib] Correct some documentation (#2225)
- [varLib/otlLib] Allow merging into VariationFont without first saving GPOS PairPos2 (#2229)
- [subset] Improve PairPosFormat2 subsetting (#2221)
- [ttLib] TTFont.save: create file on disk as late as possible (#2253)
- [cffLib] Add missing CFF2 dict operators LanguageGroup and ExpansionFactor (#2249) ATTENTION: This will change your TTX dumps!
- [pens] Reverted breaking change that turned
AbstractPenandAbstractPointPeninto abstract base classes (#2164, #2198).
- [feaLib] Indent anchor statements in
asFea()to make them more legible and diff-able (#2193). - [pens] Turn
AbstractPenandAbstractPointPeninto abstract base classes (#2164). - [feaLib] Added support for parsing and building
STATtable from AFDKO feature files (#2039). - [instancer] Added option to update name table of generated instance using
STATtable's axis values (#2189). - [bezierTools] Added functions to compute bezier point-at-time, as well as line-line, curve-line and curve-curve intersections (#2192).
- [COLRv1] Added
unbuildColrV1to deconstruct COLRv1 otTables to raw json-able data structure; it does the reverse ofbuildColrV1(#2171). - [feaLib] Allow
sub X by NULLsequence to delete a glyph (#2170). - [arrayTools] Fixed
Vectordivision (#2173). - [COLRv1] Define new
PaintSweepGradient(#2172). - [otTables] Moved
Paint.Formatenum class outside ofPaintclass definition, now namedPaintFormat. It was clashing with paint instanceFormatattribute and thus was breaking lazy load of COLR table which relies on magic__getattr__(#2175). - [COLRv1] Replace hand-coded builder functions with otData-driven dynamic implementation (#2181).
- [COLRv1] Define additional static (non-variable) Paint formats (#2181).
- [subset] Added support for subsetting COLR v1 and CPAL tables (#2174, #2177).
- [fontBuilder] Allow
setupFvarto optionally takedesignspaceLib.AxisDescriptorobjects. Added newsetupAvarmethod. Support localised names for axes and named instances (#2185).
- [woff2] An initial off-curve point with an overlap flag now stays an off-curve point after compression.
- [codecs] Handle
errorsparameter different from 'strict' for the custom extended mac encodings (#2137, #2132). - [featureVars] Raise better error message when a script is missing the required default language system (#2154).
- [COLRv1] Avoid abrupt change caused by rounding
PaintRadialGradient.c0when the start circle almost touches the end circle's perimeter (#2148). - [COLRv1] Support building unlimited lists of paints as 255-ary trees of
PaintColrLayerstables (#2153). - [subset] Prune redundant format-12 cmap subtables when all non-BMP characters are dropped (#2146).
- [basePen] Raise
MissingComponentErrorinstead of bareKeyErrorwhen a referenced component is missing (#2145).
- [COLRv1] Implemented
PaintTranslatepaint format (#2129). - [varLib.cff] Fixed unbound local variable error (#1787).
- [otlLib] Don't crash when creating OpenType class definitions if some glyphs occur more than once (#2125).
- [colorLib] Speed optimization for
LayerV1ListBuilder(#2119). - [mutator] Fixed missing tab in
interpolate_cff2_metrics(0957dc7a).
- [COLRv1] Update to latest draft: added
PaintRotateandPaintSkew(#2118). - [woff2] Support new
brotlicffibindings for PyPy (#2117). - [glifLib] Added
expectContentsFileparameter toGlyphSet, for use when reading existing UFOs, to comply with the specification stating that acontents.plistfile must exist in a glyph set (#2114). - [subset] Allow
LangSystags in--layout-scriptsoption (#2112). For example:--layout-scripts=arab.dflt,arab.URD,latn; this will keepDefaultLangSysandURDlanguage forarabscript, and all languages forlatnscript. - [varLib.interpolatable] Allow UFOs to be checked; report open paths, non existant
glyphs; add a
--jsonoption to produce a machine-readable list of incompatibilities - [pens] Added
QuartzPento createCGPathfrom glyph outlines on macOS. Requires pyobjc (#2107). - [feaLib] You can export
FONTTOOLS_LOOKUP_DEBUGGING=1to enable feature file debugging info stored inDebgtable (#2106). - [otlLib] Build more efficient format 1 and format 2 contextual lookups whenever possible (#2101).
- [colorLib] Fixed regression in 4.17.0 when building COLR v0 table; when color layers are stored in UFO lib plist, we can't distinguish tuples from lists so we need to accept either types (e5439eb9, googlefonts/ufo2ft/issues#426).
- [colorLib/otData] Updated to latest draft
COLRv1 spec (#2092). - [svgLib] Fixed parsing error when arc commands' boolean flags are not separated by space or comma (#2094).
- [varLib] Interpret empty non-default glyphs as 'missing', if the default glyph is not empty (#2082).
- [feaLib.builder] Only stash lookup location for
DebgifBuilder.buildLookups_has cooperated (#2065, #2067). - [varLib] Fixed bug in VarStore optimizer (#2073, #2083).
- [varLib] Add designspace lib key for custom feavar feature tag (#2080).
- Add HashPointPen adapted from psautohint. With this pen, a hash value of a glyph can be computed, which can later be used to detect glyph changes (#2005).
- [varLib.instancer] Fixed
TypeErrorexception when instantiating a VF with a GSUB table 1.1 in whichFeatureVariationsattribute is present but set toNone-- indicating that optionalFeatureVariationsis missing (#2077). - [glifLib] Make
xandyattributes of thepointelement required even when validation is turned off, and raise a meaningfulGlifLibErrormessage when that happens (#2075).
- [removeOverlaps] Added new module and
removeOverlapsfunction that merges overlapping contours and components in TrueType glyphs. It requires the skia-pathops module. Note that removing overlaps invalidates the TrueType hinting (#2068). - [varLib.instancer] Added
--remove-overlapscommand-line option. Theoverlapoption ininstantiateVariableFontnow takes anOverlapModeenum: 0: KEEP_AND_DONT_SET_FLAGS, 1: KEEP_AND_SET_FLAGS (default), and 2: REMOVE. The latter is equivalent to callingremoveOverlapson the generated static instance. The option continues to acceptboolvalue for backward compatibility.
- [plistlib] Added typing annotations to plistlib module. Set up mypy static typechecker to run automatically on CI (#2061).
- [ttLib] Implement private
Debgtable, a reverse-DNS namespaced JSON dict. - [feaLib] Optionally add an entry into the
Debgtable with the original lookup name (if any), feature name / script / language combination (if any), and original source filename and line location. Annotate the ttx output for a lookup with the information from the Debg table (#2052). - [sfnt] Disabled checksum checking by default in
SFNTReader(#2058). - [Docs] Document
mtiLibmodule (#2027). - [varLib.interpolatable] Added checks for contour node count and operation type of each node (#2054).
- [ttLib] Added API to register custom table packer/unpacker classes (#2055).
- [feaLib] Allow anonymous classes in LookupFlags definitions (#2037).
- [Docs] Better document DesignSpace rules processing order (#2041).
- [ttLib] Fixed 21-year old bug in
maxp.maxComponentDepthcalculation (#2044, #2045). - [varLib.models] Fixed misspelled argument name in CLI entry point (81d0042a).
- [subset] When subsetting GSUB v1.1, fixed TypeError by checking whether the optional FeatureVariations table is present (e63ecc5b).
- [Snippets] Added snippet to show how to decompose glyphs in a TTF (#2030).
- [otlLib] Generate GSUB type 5 and GPOS type 7 contextual lookups where appropriate (#2016).
- [feaLib/otlLib] Moved lookup subtable builders from feaLib to otlLib; refactored some common code (#2004, #2007).
- [docs] Document otlLib module (#2009).
- [glifLib] Fixed bug with some UFO .glif filenames clashing on case-insensitive filesystems (#2001, #2002).
- [colorLib] Updated COLRv1 implementation following changes in the draft spec: (#2008, googlefonts/colr-gradients-spec#24).
- [_n_a_m_e] Fixed error in
addMultilingualNamewith one-character names. Only attempt to recovered malformed UTF-16 data from abytesstring, not from unicodestr(#1997, #1998).
- [otlLib/varLib] Ensure that the
AxisNameIDin theSTATandfvartables is grater than 255 as per OpenType spec (#1985, #1986). - [docs] Document more modules in
fontTools.miscpackage:filenames,fixedTools,intTools,loggingTools,macCreatorType,macRes,plistlib(#1981). - [OS/2] Don't calculate whole sets of unicode codepoints, use faster and more memory efficient ranges and bisect lookups (#1984).
- [voltLib] Support writing back abstract syntax tree as VOLT data (#1983).
- [voltLib] Accept DO_NOT_TOUCH_CMAP keyword (#1987).
- [subset/merge] Fixed a namespace clash involving a private helper class (#1955).
- [feaLib] Introduced
includeDirparameter on Parser and IncludingLexer to explicitly specify the directory to search wheninclude()statements are encountered (#1973). - [ufoLib] Silently delete duplicate glyphs within the same kerning group when reading groups (#1970).
- [ttLib] Set version of COLR table when decompiling COLRv1 (commit 9d8a7e2).
- [sfnt] Fixed
NameError: SimpleNamespacewhile reading TTC header. The regression was introduced with 4.10.1 after removingpy23star import.
- [sfnt] Make
SFNTReaderpickleable even when TTFont is loaded with lazy=True option and thus keeps a reference to an external file (#1962, #1967). - [feaLib.ast] Restore backward compatibility (broken in 4.10 with #1905) for
ChainContextPosStatementandChainContextSubstStatementclasses. Make them accept either list of lookups or list of lists of lookups (#1961). - [docs] Document some modules in
fontTools.miscpackage:arrayTools,bezierToolscliToolsandeexec(#1956). - [ttLib._n_a_m_e] Fixed
findMultilingualName()when name record'sstringis encoded as bytes sequence (#1963).
- [varLib] Allow feature variations to be active across the entire space (#1957).
- [ufoLib] Added support for
formatVersionMinorin UFO'sfontinfo.plistand forformatMinorattribute in GLIF file as discussed in unified-font-object/ufo-spec#78. No changes in reading or writing UFOs until an upcoming (non-0) minor update of the UFO specification is published (#1786). - [merge] Fixed merging fonts with different versions of
OS/2table (#1865, #1952). - [subset] Fixed
AttributeErrorwhile subsettingContextSubstandContextPosFormat 3 subtable (#1879, #1944). - [ttLib.table._m_e_t_a] if data happens to be ascii, emit comment in TTX (#1938).
- [feaLib] Support multiple lookups per glyph position (#1905).
- [psCharStrings] Use inheritance to avoid repeated code in initializer (#1932).
- [Doc] Improved documentation for the following modules:
afmLib(#1933),agl(#1934),cffLib(#1935),cu2qu(#1937),encodings(#1940),feaLib(#1941),merge(#1949). - [Doc] Split off developer-centric info to new page, making front page of docs more user-focused. List all utilities and sub-modules with brief descriptions. Make README more concise and focused (#1914).
- [otlLib] Add function to build STAT table from high-level description (#1926).
- [ttLib._n_a_m_e] Add
findMultilingualName()method (#1921). - [unicodedata] Update
RTL_SCRIPTSfor Unicode 13.0 (#1925). - [gvar] Sort
gvarXML output by glyph name, not glyph order (#1907, #1908). - [Doc] Added help options to
fonttoolscommand line tool (#1913, #1920). Ensure all fonttools CLI tools have help documentation (#1948). - [ufoLib] Only write fontinfo.plist when there actually is content (#1911).
- [subset] Fixed subsetting of FeatureVariations table. The subsetter no longer drops FeatureVariationRecords that have empty substitutions as that will keep the search going and thus change the logic. It will only drop empty records that occur at the end of the FeatureVariationRecords array (#1881).
- [subset] Remove FeatureVariations table and downgrade GSUB/GPOS to version 0x10000 when FeatureVariations contain no FeatureVariationRecords after subsetting (#1903).
- [agl] Add support for legacy Adobe Glyph List of glyph names in
fontTools.agl(#1895). - [feaLib] Ignore superfluous script statements (#1883).
- [feaLib] Hide traceback by default on
fonttools feaLibcommand line. Use--tracebackoption to show (#1898). - [feaLib] Check lookup index in chaining sub/pos lookups and print better error message (#1896, #1897).
- [feaLib] Fix building chained alt substitutions (#1902).
- [Doc] Included all fontTools modules in the sphinx-generated documentation, and published it to ReadTheDocs for continuous documentation of the fontTools project (#1333). Check it out at https://fonttools.readthedocs.io/. Thanks to Chris Simpkins!
- [transform] The
Transformclass is now subclass oftyping.NamedTuple. No change in functionality (#1904).
- [feaLib] Fixed
AttributeError: 'NoneType' has no attribute 'getAlternateGlyphs'whenaaltfeature references a chain contextual substitution lookup (googlefonts/fontmake#648, #1878).
- [feaLib] If Parser is initialized without a
glyphNamesparameter, it cannot distinguish between a glyph name containing an hyphen, or a range of glyph names; instead of raising an error, it now interprets them as literal glyph names, while also outputting a logging warning to alert user about the ambiguity (#1768, #1870). - [feaLib] When serializing AST to string, emit spaces around hyphens that denote ranges. Also, fixed an issue with CID ranges when round-tripping AST->string->AST (#1872).
- [Snippets/otf2ttf] In otf2ttf.py script update LSB in hmtx to match xMin (#1873).
- [colorLib] Added experimental support for building
COLRv1 tables as per the colr-gradients-spec draft proposal. NOTE: both the API and the XML dump ofCOLRv1 are susceptible to change while the proposal is being discussed and formalized (#1822).
- [cu2qu] Added
fontTools.cu2qupackage, imported from the original cu2qu project. Thecu2qu.pensmodule was moved tofontTools.pens.cu2quPen. The optional cu2qu extension module can be compiled by installing Cython before installing fonttools from source (i.e. git repo or sdist tarball). The wheel package that is published on PyPI (i.e. the onepipdownloads, unless--no-binaryoption is used), will continue to be pure-Python for now (#1868).
- [varLib] Added support for building variable
BASEtable version 1.1 (#1858). - [CPAL] Added
fromRGBAmethod toColorclass (#1861).
- [designspaceLib] Added
add{Axis,Source,Instance,Rule}Descriptormethods toDesignSpaceDocumentclass, to initialize new descriptor objects using keyword arguments, and at the same time append them to the current document (#1860). - [unicodedata] Update to Unicode 13.0 (#1859).
- [varLib] Always build
gvartable for TrueType-flavored Variable Fonts, even if it contains no variation data. The table is required according to the OpenType spec (#1855, #1857).
- [ttx] Annotate
LookupFlagin XML dump with comment explaining what bits are set and what they mean (#1850). - [feaLib] Added more descriptive message to
IncludedFeaNotFounderror (#1842).
- [woff2] Skip normalizing
glyfandlocatables if these are missing from a font (e.g. in NotoColorEmoji usingCBDT/CBLCtables). - [timeTools] Use non-localized date parsing in
timestampFromString, to fix error when non-EnglishLC_TIMElocale is set (#1838, #1839). - [fontBuilder] Make sure the CFF table generated by fontBuilder can be used by varLib without having to compile and decompile the table first. This was breaking in converting the CFF table to CFF2 due to some unset attributes (#1836).
- [colorLib] Added
fontTools.colorLib.buildermodule, initially withbuildCOLRandbuildCPALpublic functions. More color font formats will follow (#1827). - [fontBuilder] Added
setupCOLRandsetupCPALmethods (#1826). - [ttGlyphPen] Quantize
GlyphComponent.transformfloats toF2Dot14to fix round-trip issue when computing bounding boxes of transformed components (#1830). - [glyf] If a component uses reference points (
firstPtandsecondPt) for alignment (instead of X and Y offsets), compute the effective translation offset after having applied any transform (#1831). - [glyf] When all glyphs have zero contours, compile
glyftable data as a single null byte in order to pass validation by OTS and Windows (#1829). - [feaLib] Parsing feature code now ensures that referenced glyph names are part of the known glyph set, unless a glyph set was not provided.
- [varLib] When filling in the default axis value for a missing location of a source or instance, correctly map the value forward.
- [varLib] The avar table can now contain mapping output values that are greater than OR EQUAL to the preceeding value, as the avar specification allows this.
- [varLib] The errors of the module are now ordered hierarchically below VarLibError. See #1821.
- [EBLC/CBLC] Fixed incorrect padding length calculation for Format 3 IndexSubTable (#1817, #1818).
- [varLib] Fixed error when merging OTL tables and TTFonts were loaded as
lazy=True(#1808, #1809). - [varLib] Allow to use master fonts containing
CFF2table when building VF (#1816). - [ttLib] Make
recalcBBoxesoption work also withCFF2table (#1816). - [feaLib] Don't reset
lookupflagin lookups defined inside feature blocks. They will now inherit the currentlookupflagof the feature. This is what Adobemakeotfalso does in this case (#1815). - [feaLib] Fixed bug with mixed single/multiple substitutions. If a single substitution involved a glyph class, we were incorrectly using only the first glyph in the class (#1814).
- [feaLib] Do not fail on duplicate multiple substitutions, only warn (#1811).
- [subset] Optimize SinglePos subtables to Format 1 if all ValueRecords are the same (#1802).
- [unicodedata] Update RTL_SCRIPTS for Unicode 11 and 12.
- [otTables] Fixed bug when splitting MarkBasePos subtables as offsets overflow. The mark class values in the split subtable were not being updated, leading to invalid mark-base attachments (#1797, notofonts/noto-source#145).
- [feaLib] Only log a warning instead of error when features contain duplicate substitutions (#1767).
- [glifLib] Strip XML comments when parsing with lxml (#1784, #1785).
- [subset] Fixed issue with subsetting FeatureVariations table when the index of features changes as features get dropped. The feature index need to be remapped to point to index of the remaining features (#1777, #1782).
- [fontBuilder] Added addFeatureVariations method to FontBuilder class. This is a shorthand for calling featureVars.addFeatureVariations on the builder's TTFont object (#1781).
- [glyf] Fixed the flags bug in glyph.drawPoints() like we did for glyph.draw() (#1771, #1774).
- [glyf] Use the
flagOnCurvebit mask inglyph.draw(), so that we ignore theoverlapflag that may be set when instantiating variable fonts (#1771).
- [pens] Added the following pens:
roundingPen.RoundingPen: filter pen that rounds coordinates and components' offsets to integer;roundingPen.RoundingPointPen: like the above, but using PointPen protocol.filterPen.FilterPointPen: base class for filter point pens;transformPen.TransformPointPen: filter point pen to apply affine transform;recordingPen.RecordingPointPen: records and replays point-pen commands.
- [ttGlyphPen] Always round float coordinates and component offsets to integers (#1763).
- [ufoLib] When converting kerning groups from UFO2 to UFO3, avoid confusing groups with the same name as one of the glyphs (#1761, #1762, unified-font-object/ufo-spec#98).
- [instancer] Implemented restricting axis ranges (level 3 partial instancing).
You can now pass
{axis_tag: (min, max)}tuples as input to theinstantiateVariableFontfunction. Note that changing the default axis position is not supported yet. The command-line script also accepts axis ranges in the form of colon-separated float values, e.g.wght=400:700(#1753, #1537). - [instancer] Never drop STAT
DesignAxisrecords, but only prune out-of-rangeAxisValuerecords. - [otBase/otTables] Enforce that VarStore.RegionAxisCount == fvar.axisCount, even when regions list is empty to appease OTS < v8.0 (#1752).
- [designspaceLib] Defined new
processingattribute for<rules>element, with values "first" or "last", plus other editorial changes to DesignSpace specification. Bumped format version to 4.1 (#1750). - [varLib] Improved error message when masters' glyph orders do not match (#1758, #1759).
- [featureVars] Allow to specify custom feature tag in
addFeatureVariations; allow said feature to already exist, in which case we append new lookup indices to existing features. Implemented<rules>attributeprocessingaccording to DesignSpace specification update in #1750. Depending on this flag, we generate either an 'rvrn' (always processed first) or a 'rclt' feature (follows lookup order, therefore last) (#1747, #1625, #1371). - [ttCollection] Added support for context manager auto-closing via
withstatement like withTTFont(#1751). - [unicodedata] Require unicodedata2 >= 12.1.0.
- [py2.py3] Removed yet more PY2 vestiges (#1743).
- [_n_a_m_e] Fixed issue when comparing NameRecords with different string types (#1742).
- [fixedTools] Changed
fixedToFloatto not do any rounding but simply returnvalue / (1 << precisionBits). AddedfloatToFixedToStrandstrToFixedToFloatfunctions to be used when loading from or dumping to XML. Fixed values (e.g. fvar axes and instance coordinates, avar mappings, etc.) are are now stored as un-rounded decimal floats upon decompiling (#1740, #737). - [feaLib] Fixed handling of multiple
LigatureCaretstatements for the same glyph. Only the first rule per glyph is used, additional ones are ignored (#1733).
- [voltLib] Added support for
ALLandNONEinPROCESS_MARKS(#1732). - [Silf] Fixed issue in
Silftable compilation and decompilation regarding str vs bytes in python3 (#1728). - [merge] Handle duplicate glyph names better: instead of appending font index to
all glyph names, use similar code like we use in
postandCFFtables (#1729).
- [otTables] Support fixing offset overflows in
MultipleSubstlookup subtables (#1706). - [subset] Prune empty strikes in
EBDTandCBDTtable data (#1698, #1633). - [pens] Fixed issue in
PointToSegmentPenwhen last point of closed contour has same coordinates as the starting point and was incorrectly dropped (#1720). - [Graphite] Fixed
Silltable output to pass OTS (#1705). - [name] Added
removeNamesmethod totable__n_a_m_eclass (#1719). - [ttLib] Added aliases for renamed entries
ascenderanddescenderinhheatable (#1715).
- NOTE: The v4.x version series only supports Python 3.6 or greater. You can keep using fonttools 3.x if you need support for Python 2.
- [py23] Removed all the python2-only code since it is no longer reachable, thus unused; only the Python3 symbols were kept, but these are no-op. The module is now DEPRECATED and will removed in the future.
- [ttLib] Fixed UnboundLocalError for empty loca/glyph tables (#1680). Also, allow the glyf table to be incomplete when dumping to XML (#1681).
- [varLib.models] Fixed KeyError while sorting masters and there are no on-axis for a given axis (38a8eb0e).
- [cffLib] Make sure glyph names are unique (#1699).
- [feaLib] Fix feature parser to correctly handle octal numbers (#1700).
- NOTE: This is the last scheduled release to support Python 2.7. The upcoming fonttools v4.x series is going to require Python 3.6 or greater.
- [varLib] Added new
varLib.instancermodule for partially instantiating variable fonts. This extends (and will eventually replace)varLib.mutatormodule, as it allows to create not just full static instances from a variable font, but also "partial" or "less variable" fonts where some of the axes are dropped or instantiated at a particular value. Also available from the command-line as fonttools varLib.instancer --help (#1537, #1628). - [cffLib] Added support for
FDSelectformat 4 (#1677). - [subset] Added support for subsetting
sbix(Apple bitmap color font) table. - [t1Lib] Fixed issue parsing
eexecsection in Type1 fonts when whitespace characters are interspersed among the trailing zeros (#1676). - [cffLib.specializer] Fixed bug in
programToCommandswith CFF2 charstrings (#1669).
- [featureVars] Fixed region-merging code on python3 (#1659).
- [varLib.cff] Fixed merging of sparse PrivateDict items (#1653).
- [subset] Fixed regression when passing
--flavor=woff2option with an input font that was already compressed as WOFF 1.0 (#1650).
- [woff2] Added support for compressing/decompressing WOFF2 fonts with non-transformed
glyfandlocatables, as well as with transformedhmtxtable. RemovedSnippets/woff2_compress.pyandSnippets/woff2_decompress.pyscripts, and replaced them with a new console entry pointfonttools ttLib.woff2that provides two sub-commandscompressanddecompress. - [varLib.cff] Fixed bug when merging CFF2
PrivateDicts. ThePrivateDictdata from the first region font was incorrecty used for all subsequent fonts. The bug would only affect variable CFF2 fonts with hinting (#1643, #1644). Also, fixed a merging bug when VF masters have no blends or marking glyphs (#1632, #1642). - [loggingTools] Removed unused backport of
LastResortLoggerclass. - [subset] Gracefully handle partial MATH table (#1635).
- [featureVars] Avoid duplicate references to
rvrnfeature record inDefaultLangSystables when callingaddFeatureVariationson a font that does not already have aGSUBtable (aa8a5bc6). - [varLib] Fixed merging of class-based kerning. Before, the process could introduce rogue kerning values and variations for random classes against class zero (everything not otherwise classed).
- [varLib] Fixed merging GPOS tables from master fonts with different number of
SinglePossubtables (#1621, #1641). - [unicodedata] Updated Blocks, Scripts and ScriptExtensions to Unicode 12.1.
- [OS/2] Fixed sign of
fsType: it should beuint16, notint16(#1619). - [subset] Skip out-of-range class values in mark attachment (#1478).
- [fontBuilder] Add an empty
DSIGtable withsetupDummyDSIGmethod (#1621). - [varLib.merger] Fixed bug whereby
GDEF.GlyphClassDefwere being dropped when generating instance viavarLib.mutator(#1614). - [varLib] Added command-line options
-vand-qto configure logging (#1613). - [subset] Update font extents in head table (#1612).
- [subset] Make --retain-gids truncate empty glyphs after the last non-empty glyph (#1611).
- [requirements] Updated
unicodedata2backport for Unicode 12.0.
- [cffLib] Fixed issue when importing a
CFF2variable font from XML, whereby the VarStore state was not propagated to PrivateDict (#1598). - [varLib] Don't drop
postglyph names when building CFF2 variable font (#1609).
- [designspaceLib] Added
loadSourceFontsmethod to load source fonts using custom opener function (#1606). - [head] Round font bounding box coordinates to integers to fix compile error if CFF font has float coordinates (#1604, #1605).
- [feaLib] Don't write
Noneinast.ValueRecord.asFea()(#1599). - [subset] Fixed issue
AssertionErrorwhen using--desubroutinizeoption (#1590, #1594). - [graphite] Fixed bug in
Silftable'sdecompilemethod unmasked by previous typo fix (#1597). Decode languange code as UTF-8 inSilltable'sdecompilemethod (#1600).
- [varLib/cffLib] Added support for building
CFF2variable font from sparse masters, or masters with more than one model (multipleVarStore.VarData). IncffLib.specializer, added support forCFF2CharStrings withblendoperators (#1547, #1591). - [subset] Fixed subsetting
HVARandVVARwith--retain-gidsoption, and when advances mapping is null while sidebearings mappings are non-null (#1587, #1588). - Added
otlLib.maxContextCalcmodule to computeOS/2.usMaxContextvalue. Calculate it automatically when compiling features with feaLib. Added option--recalc-max-contexttosubsetmodule (#1582). - [otBase/otTables] Fixed
AttributeErroron missing OT table fields after importing font from TTX (#1584). - [graphite] Fixed typo
Silftable'sdecompilemethod (#1586). - [otlLib] Better compress
GPOSSinglePos (LookupType 1) subtables (#1539).
- [subset] Fixed error while subsetting
VVARwith--retain-gidsoption (#1552). - [designspaceLib] Use up-to-date default location in
findDefaultmethod (#1554). - [voltLib] Allow passing file-like object to Parser.
- [arrayTools/glyf]
calcIntBounds(used to compute bounding boxes of glyf table's glyphs) now usesotRoundinstead ofround3(#1566). - [svgLib] Added support for converting more SVG shapes to path
dstrings (ellipse, line, polyline), as well as support fortransformattributes. Onlymatrixtransformations are currently supported (#1564, #1564). - [varLib] Added support for building
VVARtable fromvmtxandVORGtables (#1551). - [fontBuilder] Enable making CFF2 fonts with
posttable format 2 (#1557). - Fixed
DeprecationWarningon invalid escape sequences (#1562).
- [ttLib/glyf] Raise more specific error when encountering recursive component references (#1545, #1546).
- [Doc/designspaceLib] Defined new
public.skipExportGlyphslib key (#1534, unified-font-object/ufo-spec#84). - [varLib] Use
vmtxto compute vertical phantom points; orhhea.ascentandhead.unitsPerEMifvmtxis missing (#1528). - [gvar/cvar] Sort XML element's min/value/max attributes in TupleVariation toXML to improve readability of TTX dump (#1527).
- [varLib.plot] Added support for 2D plots with only 1 variation axis (#1522).
- [designspaceLib] Use axes maps when normalizing locations in DesignSpaceDocument (#1226, #1521), and when finding default source (#1535).
- [mutator] Set
OVERLAP_SIMPLEandOVERLAP_COMPOUNDglyf flags by default ininstantiateVariableFont. Added--no-overlapcli option to disable this (#1518). - [subset] Fixed subsetting
VVARtable (#1516, #1517). Fixed subsetting anHVARtable that has anAdvanceWidthMapwhen the option--retain-gidsis used. - [feaLib] Added
forceChainedin MultipleSubstStatement (#1511). Fixed double indentation ofsubtablestatement (#1512). Added support forsubtablestatement in more places than just PairPos lookups (#1520). Handle lookupflag 0 and lookupflag without a value (#1540). - [varLib] In
load_designspace, provide a default English name for theitalaxis tag. - Remove pyftinspect because it is unmaintained and bitrotted.
- [cffLib] Fixed RecursionError when unpickling or deepcopying TTFont with CFF table (#1488, 649dc49).
- [subset] Fixed AttributeError when using --desubroutinize option (#1490). Also, fixed desubroutinizing bug when subrs contain hints (#1499).
- [CPAL] Make Color a subclass of namedtuple (173a0f5).
- [feaLib] Allow hyphen in glyph class names.
- [feaLib] Added 'tables' option to __main__.py (#1497).
- [feaLib] Add support for special-case contextual positioning formatting (#1501).
- [svgLib] Support converting SVG basic shapes (rect, circle, etc.) into equivalent SVG paths (#1500, #1508).
- [Snippets] Added name-viewer.ipynb Jupyter notebook.
- The previous release accidentally changed several files from Unix to DOS line-endings. Fix that.
- [varLib] Temporarily revert the fix to
load_masters(), which caused a crash ininterpolate_layout()whendeepcopy-ing OTFs.
- [varLib]
load_masters()now actually assigns the fonts it loads to the source.font attributes. - [varLib] Fixed an MVAR table generation crash when sparse masters were involved.
- [voltLib]
parse_coverage_()returns a tuple instead of an ast.Enum. - [feaLib] A MarkClassDefinition inside a block is no longer doubly indented compared to the rest of the block.
- [svgLib] Added support for converting elliptical arcs to cubic bezier curves (#1464).
- [py23] Added backport for
math.isfinite. - [varLib] Apply HIDDEN flag to fvar axis if designspace axis has attribute
hidden=1. - Fixed "DeprecationWarning: invalid escape sequence" in Python 3.7.
- [voltLib] Fixed parsing glyph groups. Distinguish different PROCESS_MARKS. Accept COMPONENT glyph type.
- [feaLib] Distinguish missing value and explicit
<NULL>for PairPos2 format A (#1459). Round-tripuseExtensionkeyword. ImplementedValueRecord.asFeamethod. - [subset] Insert empty widths into hdmx when retaining gids (#1458).
- [ttx] Added
--no-recalc-timestampoption to keep the original font'shead.modifiedtimestamp (#1455, #46). - [ttx/psCharStrings] Fixed issues while dumping and round-tripping CFF2 table with ttx (#1451, #1452, #1456).
- [voltLib] Fixed check for duplicate anchors (#1450). Don't try to read past
the
ENDoperator in .vtp file (#1453). - [varLib] Use sentinel value -0x8000 (-32768) to ignore post.underlineThickness and post.underlinePosition when generating MVAR deltas (#1449, googlefonts/ufo2ft#308).
- [subset] Added
--retain-gidsoption to subset font without modifying the current glyph indices (#1443, #1447). - [ufoLib] Replace deprecated calls to
getbytesandsetbyteswith new equivalentreadbytesandwritebytescalls.fs>= 2.2 no required. - [varLib] Allow loading masters from TTX files as well (#1441).
- [hmtx/vmtx]: Allow to compile/decompile
hmtxandvmtxtables even without the corresponding (required) metrics header tables,hheaandvhea(#1439). - [varLib] Added support for localized axes'
labelnameand named instances'stylename(#1438).
- [_m_a_x_p] Include
maxComponentElementsinmaxptable's recalculation.
- [psCharStrings] In
encodeFloatfunction, use float's "general format" with 8 digits of precision (i.e.%8g) instead ofstr(). This works around a macOS rendering issue when real numbers in CFF table are too long, and also makes sure that floats are encoded with the same precision in python 2.7 and 3.x (#1430, googlefonts/ufo2ft#306). - [_n_a_m_e/fontBuilder] Make
_n_a_m_e_table.addMultilingualNamealso add Macintosh (platformID=1) names by default. Added options toFontBuildersetupNameTablemethod to optionally disable Macintosh or Windows names. (#1359, #1431). - [varLib] Make
buildoptionally accept aDesignSpaceDocumentobject, instead of a designspace file path. The caller can now set thefontattribute of designspace's sources to a TTFont object, thus allowing to skip filenames manipulation altogether (#1416, #1425). - [sfnt] Allow SFNTReader objects to be deep-copied.
- Require typing>=3.6.4 on py27 to fix issue with singledispatch (#1423).
- [designspaceLib/t1Lib/macRes] Fixed some cases where pathlib.Path objects were not accepted (#1421).
- [varLib] Fixed merging of multiple PairPosFormat2 subtables (#1411).
- [varLib] The default STAT table version is now set to 1.1, to improve compatibility with legacy applications (#1413).
- [merge] Fixed AssertionError when none of the script tables in GPOS/GSUB have a DefaultLangSys record (#1408, 135a4a1).
- [varLib] Work around macOS rendering issue for composites without gvar entry (#1381).
- [varLib] Support generation of CFF2 variable fonts.
model.reorderMasters()now supports arbitrary mapping. Fix handling of overlapping ranges for feature variations (#1400). - [cffLib, subset] Code clean-up and fixing related to CFF2 support.
- [ttLib.tables.ttProgram] Use raw strings for regex patterns (#1389).
- [fontbuilder] Initial support for building CFF2 fonts. Set CFF's
FontMatrixautomatically from unitsPerEm. - [plistLib] Accept the more general
collections.Mappinginstead of the specificdictclass to support custom data classes that should serialize to dictionaries.
- [subset] subsetter bug fix with variable fonts.
- [varLib.featureVar] Improve FeatureVariations generation with many rules.
- [varLib] Enable sparse masters when building variable fonts: fonttools#1368 (comment)
- [varLib.mutator] Add IDEF for GETVARIATION opcode, for handling hints in an instance.
- [ttLib] Ignore the length of kern table subtable format 0
- [ufoLib] Make
UFOWritera subclass ofUFOReader, and use mixins for shared methods (#1344). - [featureVars] Fixed normalization error when a condition's minimum/maximum
attributes are missing in designspace
<rule>(#1366). - [setup.py] Added
[plot]to extras, to optionally installmatplotlib, needed to use thefonTools.varLib.plotmodule. - [varLib] Take total bounding box into account when resolving model (7ee81c8). If multiple axes have the same range ratio, cut across both (62003f4).
- [subset] Don't error if
STAThas noAxisValuetables. - [fontBuilder] Added a new submodule which contains a
FontBuilderwrapper class aroundTTFontthat makes it easier to create a working TTF or OTF font from scratch with code. NOTE: the API is still experimental and may change in future versions.
- [ufoLib] Merged the ufoLib
master branch into a new
fontTools.ufoLibpackage (#1335, #1095). MovedufoLib.pointPenmodule tofontTools.pens.pointPen. MovedufoLib.etreemodule tofontTools.misc.etree. MovedufoLib.plistlibmodule tofontTools.misc.plistlib. To use the newfontTools.ufoLibmodule you need to install fonttools with the[ufo]extra, or you can manually install the required additional dependencies (cf. README.rst). - [morx] Support AAT action type to insert glyphs and clean up compilation of AAT action tables (4a1871f, 2011ccf).
- [subset] The
--no-hintingon a CFF font now also drops the optional hinting keys in Private dict:ForceBold,LanguageGroup, andExpansionFactor(#1322). - [subset] Include nameIDs referenced by STAT table (#1327).
- [loggingTools] Added
msg=Noneargument toCapturingLogHandler.assertRegex(0245f2c). - [varLib.mutator] Implemented
FeatureVariationsinstantiation (#1244). - [g_l_y_f] Added PointPen support to
_TTGlyphobjects (#1334).
- [feaLib] Skip building noop class PairPos subtables when Coverage is NULL (#1318).
- [ttx] Expose the previously reserved bit flag
OVERLAP_SIMPLEof glyf table's contour points in the TTX dump. This is used in some implementations to specify a non-zero fill with overlapping contours (#1316). - [ttLib] Added support for decompiling/compiling
TS1Ctables containing VTT sources forcvarvariation table (#1310). - [varLib] Use
fontTools.designspaceLibto read DesignSpaceDocument. ThefontTools.varLib.designspacemodule is now deprecated and will be removed in future versions. The presence of an explicitaxeselement is now required in order to build a variable font (#1224, #1313). - [varLib] Implemented building GSUB FeatureVariations table from the
ruleselement of DesignSpace document (#1240, #713, #1314). - [subset] Added
--no-layout-closureoption to not expand the subset with the glyphs produced by OpenType layout features. Instead, OpenType features will be subset to only rules that are relevant to the otherwise-specified glyph set (#43, #1121).
- [feaLib] Fixed issue whereby lookups from DFLT/dflt were not included in the DFLT/non-dflt language systems (#1307).
- [graphite] Fixed issue on big-endian architectures (e.g. ppc64) (#1311).
- [subset] Added
--layout-scriptsoption to add/exclude set of OpenType layout scripts that will be preserved. By default all scripts are retained ('*') (#1303).
- [feaLib] In the OTL table builder, when the
nametable is excluded from the list of tables to be build, skip compilingfeatureNamesblocks, as the records referenced inFeatureParamstable don't exist (68951b7). - [otBase] Try
ExtensionLookupif other offset-overflow methods fail (05f95f0). - [feaLib] Added support for explicit
subtable;break statements in PairPos lookups; previously these were ignored (#1279, #1300, #1302). - [cffLib.specializer] Make sure the stack depth does not exceed maxstack - 1, so that a subroutinizer can insert subroutine calls (#1301, googlefonts/ufo2ft#266).
- [otTables] Added support for fixing offset overflow errors occurring inside
MarkBasePossubtables (#1297). - [subset] Write the default output file extension based on
--flavoroption, or the value ofTTFont.sfntVersion(d7ac0ad). - [unicodedata] Updated Blocks, Scripts and ScriptExtensions for Unicode 11 (452c85e).
- [xmlWriter] Added context manager to XMLWriter class to autoclose file descriptor on exit (#1290).
- [psCharStrings] Optimize the charstring's bytecode by encoding as integers all float values that have no decimal portion (8d7774a).
- [ttFont] Fixed missing import of
TTLibErrorexception (#1285). - [feaLib] Allow any languages other than
dfltunderDFLTscript (#1278, #1292).
- [featureVars] Added experimental module to build
FeatureVariationstables. Still needs to be hooked up tovarLib.build(#1240). - [fixedTools] Added
otRoundto round floats to nearest integer towards positive Infinity. This is now used where we deal with visual data like X/Y coordinates, advance widths/heights, variation deltas, and similar (#1274, #1248). - [subset] Improved GSUB closure memoize algorithm.
- [varLib.models] Fixed regression in model resolution (180124, #1269).
- [feaLib.ast] Fixed error when converting
SubtableStatementto string (#1275). - [varLib.mutator] Set
OS/2.usWeightClassandusWidthClass, andpost.italicAnglebased on the 'wght', 'wdth' and 'slnt' axis values (#1276, #1264). - [py23/loggingTools] Don't automatically set
logging.lastResorthandler on py27. MovedLastResortLoggerto theloggingToolsmodule (#1277).
- [ttGlyphPen] Issue a warning and skip building non-existing components (googlefonts/fontmake#411).
- [tests] Fixed issue running ttx_test.py from a tagged commit.
- [designspaceLib] Added new
conditionSetelement toruleelement in designspace document. Bumpedformatattribute to4.0(previously, it was formatted as an integer). RemovedcheckDefault,checkAxesmethods, and any kind of guessing about the axes when the<axes>element is missing. The default master is expected at the intersection of all default values for each axis (#1254, #1255, #1267). - [cffLib] Fixed issues when compiling CFF2 or converting from CFF when the font has an FDArray (#1211, #1271).
- [varLib] Avoid attempting to build
cvartable whenglyftable is not present, as is the case for CFF2 fonts. - [subset] Handle None coverages in MarkGlyphSets; revert commit 02616ab that sets empty Coverage tables in MarkGlyphSets to None, to make OTS happy.
- [ttFont] Allow to build glyph order from
maxp.numGlyphswhenpostorcmapare missing. - [ttFont] Added
__len__method to_TTGlyphSet. - [glyf] Ensure
GlyphCoordinatesnever overflow signed shorts (#1230). - [py23] Added alias for
itertools.izipshadowing the built-inzip. - [loggingTools] Memoize
logproperty ofLogMixinclass (fbab12). - [ttx] Impoved test coverage (#1261).
- [Snippets] Addded script to append a suffix to all family names in a font.
- [varLib.plot] Make it work with matplotlib >= 2.1 (b38e2b).
- [designspace] Added a new optional
layerattribute to the source element, and a correspondinglayerNameattribute to theSourceDescriptorobject (#1253). Addedconditionsetelement to theruleelement to the spec, but not implemented in designspace reader/writer yet (#1254). - [varLib.models] Refine modeling one last time (0ecf5c5).
- [otBase] Fixed sharing of tables referred to by different offset sizes (795f2f9).
- [subset] Don't drop a GDEF that only has VarStore (fc819d6). Set to None empty Coverage tables in MarkGlyphSets (02616ab).
- [varLib]: Added
--master-findercommand-line option (#1249). - [varLib.mutator] Prune fvar nameIDs from instance's name table (#1245).
- [otTables] Allow decompiling bad ClassDef tables with invalid format, with warning (#1236).
- [varLib] Make STAT v1.2 and reuse nameIDs from fvar table (#1242).
- [varLib.plot] Show master locations. Set axis limits to -1, +1.
- [subset] Handle HVAR direct mapping. Passthrough 'cvar'.
Added
--font-numbercommand-line option for collections. - [t1Lib] Allow a text encoding to be specified when parsing a Type 1 font
(#1234). Added
kindargument to T1Font constructor (c5c161c). - [ttLib] Added context manager API to
TTFontclass, so it can be used inwithstatements to auto-close the file when exiting the context (#1232).
- [varLib] Improved support-resolution algorithm. Previously, the on-axis masters would always cut the space. They don't anymore. That's more consistent, and fixes the main issue Erik showed at TYPO Labs 2017. Any varfont built that had an unusual master configuration will change when rebuilt (42bef17, a523a697, googlefonts/fontmake#264).
- [varLib.models] Added a
main()entry point, that takes positions and prints model results. - [varLib.plot] Added new module to plot a designspace's
VariationModel. Requires
matplotlib. - [varLib.mutator] Added -o option to specify output file path (2ef60fa).
- [otTables] Fixed IndexError while pruning of HVAR pre-write (6b6c34a).
- [varLib.models] Convert delta array to floats if values overflows signed short integer (0055f94).
- [otBase] Don't fail during
ValueRecordcopy if src has more items. We drop hinting in the subsetter by simply changing ValueFormat, without cleaning up the actual ValueRecords. This was causing assertion error if a variable font was subsetted without hinting and then passed directly to the mutator for instantiation without first it saving to disk.
- [varLib] Don't remap the same
DeviceTabletwice in VarStore optimizer (#1206). - [varLib] Add
--disable-iupoption tofonttools varLibscript, and aoptimize=Truekeyword argument tovarLib.buildfunction, to optionally disable IUP optimization while building varfonts. - [ttCollection] Fixed issue while decompiling ttc with python3 (#1207).
- [ttGlyphPen] Decompose composite glyphs if any components' transform is too
large to fit a
F2Dot14value, or clamp transform values that are (almost) equal to +2.0 to make them fit and avoid decomposing (#1200, #1204, #1205). - [ttx] Added new
-goption to dump glyphs from theglyftable splitted as individual ttx files (#153, #1035, #1132, #1202). - Copied
ufoLib.filenamesmodule tofontTools.misc.filenames, used for the ttx split-glyphs option (#1202). - [feaLib] Added support for
cvParametersblocks in Character Variant feauturescv01-cv99(#860, #1169). - [Snippets] Added
checksum.pyscript to generate/check SHA1 hash of ttx files (#1197). - [varLib.mutator] Fixed issue while instantiating some variable fonts
whereby the horizontal advance width computed from
gvarphantom points could turn up to be negative (#1198). - [varLib/subset] Fixed issue with subsetting GPOS variation data not
picking up
ValueRecordDeviceobjects (54fd71f). - [feaLib/voltLib] In all AST elements, the
locationis no longer a required positional argument, but an optional kewyord argument (defaults toNone). This will make it easier to construct feature AST from code (#1201).
- [designspaceLib] Added an optional
libelement to the designspace as a whole, as well as to the instance elements, to store arbitrary data in a property list dictionary, similar to the UFO'slib. Added an optionalfontattribute to theSourceDescriptor, to allow operating on in-memory font objects (#1175). - [cffLib] Fixed issue with lazy-loading of attributes when attempting to set the CFF TopDict.Encoding (#1177, #1187).
- [ttx] Fixed regression introduced in 3.22.0 that affected the split tables
-soption (#1188). - [feaLib] Added
IncludedFeaNotFoundcustom exception subclass, raised when an included feature file cannot be found (#1186). - [otTables] Changed
VarIdxMapto use glyph names internally instead of glyph indexes. The old ttx dumps of HVAR/VVAR tables that contain indexes can still be imported (21cbab8, 38a0ffb). - [varLib] Implemented VarStore optimizer (#1184).
- [subset] Implemented pruning of GDEF VarStore, HVAR and MVAR (#1179).
- [sfnt] Restore backward compatiblity with
numFontsattribute ofSFNTReaderobject (#1181). - [merge] Initial support for merging
LangSysRecords(#1180). - [ttCollection] don't seek(0) when writing to possibly unseekable strems.
- [subset] Keep all
--name-IDsfrom 0 to 6 by default (#1170, #605, #114). - [cffLib] Added
widthmodule to calculate optimal CFF default and nominal glyph widths. - [varLib] Don’t fail if STAT already in the master fonts (#1166).
- [subset] Support subsetting
endcharacting asseac-like components inCFF(fixes #1162). - [feaLib] Allow to build from pre-parsed
ast.FeatureFileobject. Addedtablesargument to only build some tables instead of all (#1159, #1163). - [textTools] Replaced
safeEvalwithast.literal_eval(#1139). - [feaLib] Added option to the parser to not resolve
includestatements (#1154). - [ttLib] Added new
ttCollectionmodule to read/write TrueType and OpenType Collections. Exports aTTCollectionclass with afontsattribute containing a list ofTTFontinstances, the methodssaveandsaveXML, plus some list-like methods. TheimportXMLmethod is not implemented yet (#17). - [unicodeadata] Added
ot_tag_to_scriptfunction that converts from OpenType script tag to Unicode script code. - Added new
designspaceLibsubpackage, originally from Erik Van Blokland'sdesignSpaceDocument: https://github.com/LettError/designSpaceDocument NOTE: this is not yet used internally by varLib, and the API may be subject to changes (#911, #1110, LettError/designSpaceDocument#28). - Added new FontTools icon images (8ee7c32).
- [unicodedata] Added
script_horizontal_directionfunction that returns either "LTR" or "RTL" given a unicode script code. - [otConverters] Don't write descriptive name string as XML comment if the NameID value is 0 (== NULL) (#1151, #1152).
- [unicodedata] Add
ot_tags_from_scriptfunction to get the list of OpenType script tags associated with unicode script code (#1150). - [feaLib] Don't error when "enumerated" kern pairs conflict with preceding single pairs; emit warning and chose the first value (#1147, #1148).
- [loggingTools] In
CapturingLogHandler.assertRegexmethod, match the fully formatted log message. - [sbix] Fixed TypeError when concatenating str and bytes (#1154).
- [bezierTools] Implemented cusp support and removed
approximate_fallbackarg incalcQuadraticArcLength. AddedcalcCubicArcLength(#1142).
- [varLib] Fixed merging PairPos Format1/2 with missing subtables (#1125).
- [feaLib] Allow mixed single/multiple substitutions (#612)
- Added missing
*.afmtest assets to MAINFEST.in (#1137). - Fixed dumping
SVGtables containing color palettes (#1124).
- [cmap] when compiling format6 subtable, don't assume gid0 is always called '.notdef' (1e42224).
- [ot] Allow decompiling fonts with bad Coverage format number (1aafae8).
- Change FontTools licence to MIT (#1127).
- [post] Prune extra names already in standard Mac set (df1e8c7).
- [subset] Delete empty SubrsIndex after subsetting (#994, #1118).
- [varLib] Don't share points in cvar by default, as it currently fails on some browsers (#1113).
- [afmLib] Make poor old afmLib work on python3.
- [unicodedata] Fixed issue with
scriptandscript_extensionfunctions returning inconsistent short vs long names. They both return the short four- letter script codes now. Addedscript_nameandscript_codefunctions to look up the long human-readable script name from the script code, and viceversa (#1109, #1111).
- [unicodedata] Addded new module
fontTools.unicodedatawhich exports the same interface as the built-inunicodedatamodule, with the addition of a few functions that are missing from the latter, such asscript,script_extensionandblock. Added aMetaTools/buildUCD.pyscript to download and parse data files from the Unicode Character Database and generate python modules containing lists of ranges and property values. - [feaLib] Added
__str__method to allastelements (delegates to theasFeamethod). - [feaLib]
Parserconstructor now accepts aglyphNamesiterable instead ofglyphMapdict. The latter still works but with a pending deprecation warning (#1104). - [bezierTools] Added arc length calculation functions originally from
pens.perimeterPenmodule (#1101). - [varLib] Started generating STAT table (8af4309). Right now it just reflects the axes, and even that with certain limitations: * AxisOrdering is set to the order axes are defined, * Name-table entries are not shared with fvar.
- [py23] Added backports for
redirect_stdoutandredirect_stderrcontext managers (#1097). - [Graphite] Fixed some round-trip bugs (#1093).
- [varLib] Try set of used points instead of all points when testing whether to share points between tuples (#1090).
- [CFF2] Fixed issue with reading/writing PrivateDict BlueValues to TTX file.
Read the commit message 8b02b5a and issue #1030 for more details.
NOTE: this change invalidates all the TTX files containing CFF2 tables
that where dumped with previous verisons of fonttools.
CFF2 Subr items can have values on the stack after the last operator, thus
a
CFF2Subrclass was added to accommodate this (#1091). - [_k_e_r_n] Fixed compilation of AAT kern version=1.0 tables (#1089, #1094)
- [ttLib] Added getBestCmap() convenience method to TTFont class and cmap table class that returns a preferred Unicode cmap subtable given a list of options (#1092).
- [morx] Emit more meaningful subtable flags. Implement InsertionMorphAction
- [feaLib] Fixed writing back nested glyph classes (#1086).
- [TupleVariation] Reactivated shared points logic, bugfixes (#1009).
- [AAT] Implemented
morxligature subtables (#1082). - [reverseContourPen] Keep duplicate lineTo following a moveTo (#1080, googlefonts/cu2qu#51).
- [varLib.mutator] Suport instantiation of GPOS, GDEF and MVAR (#1079).
- [sstruct] Fixed issue with
unicode_literalsandstructmodule in old versions of python 2.7 (#993).
- [svgPathPen] Added an
SVGPathPenthat translates segment pen commands into SVG path descriptions. Copied from Tal Leming'sufo2svg.svgPathPenhttps://github.com/typesupply/ufo2svg/blob/d69f992/Lib/ufo2svg/svgPathPen.py - [reverseContourPen] Added
ReverseContourPen, a filter pen that draws contours with the winding direction reversed, while keeping the starting point (#1071). - [filterPen] Added
ContourFilterPento manipulate contours as a whole rather than segment by segment. - [arrayTools] Added
Vectorclass to apply math operations on an array of numbers, andpairwisefunction to loop over pairs of items in an iterable. - [varLib] Added support for building and interpolation of
cvartable (f874cf6, a25a401).
- [head] Try using
SOURCE_DATE_EPOCHenvironment variable when setting theheadmodified timestamp to ensure reproducible builds (#1063). See https://reproducible-builds.org/specs/source-date-epoch/ - [VTT] Decode VTT's
TSI*tables text as UTF-8 (#1060). - Added support for Graphite font tables: Feat, Glat, Gloc, Silf and Sill. Thanks @mhosken! (#1054).
- [varLib] Default to using axis "name" attribute if "labelname" element is missing (588f524).
- [merge] Added support for merging Script records. Remove unused features and lookups after merge (d802580, 556508b).
- Added
fontTools.svgLibpackage. Includes a parser for SVG Paths that supports the Pen protocol (#1051). Also, added a snippet to convert SVG outlines to UFO GLIF (#1053). - [AAT] Added support for
ankr,bsln,mort,morx,gcid, andcidg. - [subset] Implemented subsetting of
prop,opbd,bsln,lcar.
- [otConverters] Implemented
__add__and__radd__methods onotConverters._LazyListthat decompile a lazy list before adding it to another list or_LazyListinstance. Fixes anAttributeErrorin thesubsetmodule when attempting to sum_LazyListobjects (6ef48bd2, 1aef1683). - [AAT] Support the opbd table with optical bounds (a47f6588).
- [AAT] Support prop table with glyph properties (d05617b4).
- [AAT] Added support for AAT lookups. The
lcartable can be decompiled and recompiled; futher work needed to handlemorxtable (#1025). - [subset] Keep (empty) DefaultLangSys for Script 'DFLT' (6eb807b5).
- [subset] Support GSUB/GPOS.FeatureVariations (fe01d87b).
- [varLib] In
models.supportScalars, ignore an axis when its peak value is 0 (fixes #1020). - [varLib] Add default mappings to all axes in avar to fix rendering issue in some rasterizers (19c4b377, 04eacf13).
- [varLib] Flatten multiple tail PairPosFormat2 subtables before merging (c55ef525).
- [ttLib] Added support for recalculating font bounding box in
CFFandheadtables, and min/max values inhheaandvheatables (#970).
- [varLib.merger] Remove Extensions subtables before merging (f7c20cf8).
- [varLib] Initialize the avar segment map with required default entries (#1014).
- [varLib] Implemented optimal IUP optmiziation (#1019).
- [otData] Add
AxisValueFormat4for STAT table v1.2 from OT v1.8.2 (#1015). - [name] Fixed BCP46 language tag for Mac langID=9: 'si' -> 'sl'.
- [subset] Return value from
_DehintingT2Decompiler.op_hintmask(c0d672ba). - [cffLib] Allow to get TopDict by index as well as by name (dca96c9c).
- [cffLib] Removed global
isCFF2state; use one set of classes for both CFF and CFF2, maintaining backward compatibility existing code (#1007). - [cffLib] Deprecated maxstack operator, per OpenType spec update 1.8.1.
- [cffLib] Added missing default (-100) for UnderlinePosition (#983).
- [feaLib] Enable setting nameIDs greater than 255 (#1003).
- [varLib] Recalculate ValueFormat when merging SinglePos (#996).
- [varLib] Do not emit MVAR if there are no entries in the variation store (#987).
- [ttx] For
-xoption, pad with space if table tag length is < 4.
- [feaLib.builder] Removed duplicate lookups optimization. The original lookup order and semantics of the feature file are preserved (#976).
- [varLib.mutator] Implement IUP optimization (#969).
- [_g_l_y_f.GlyphCoordinates] Changed
__bool__()semantics to match those of other iterables (e46f949). Removed__abs__()(3db5be2). - [varLib.interpolate_layout] Added
mappedkeyword argument tointerpolate_layoutto allow disabling avar mapping: if False (default), the location is mapped using the map element of the axes in designspace file; if True, it is assumed that location is in designspace's internal space and no mapping is performed (#950, #975). - [varLib.interpolate_layout] Import designspace-loading logic from varLib.
- [varLib] Fixed bug with recombining PairPosClass2 subtables (81498e5, #914).
- [cffLib.specializer] When copying iterables, cast to list (462b7f86).
- [pens.t2CharStringPen] Fixed AttributeError when calling addComponent in T2CharStringPen (#965).
- [cffLib.specializer] Added new
specializermodule to optimize CFF charstrings, used by the T2CharStringPen (#948). - [varLib.mutator] Sort glyphs by component depth before calculating composite glyphs' bounding boxes to ensure deltas are correctly caclulated (#945).
- [_g_l_y_f] Fixed loss of precision in GlyphCoordinates by using 'd' (double)
instead of 'f' (float) as
array.arraytypecode (#963, #964).
- [t2CharStringPen] Initial support for specialized Type2 path operators: vmoveto, hmoveto, vlineto, hlineto, vvcurveto, hhcurveto, vhcurveto and hvcurveto. This should produce more compact charstrings (#940, #403).
- [Doc] Added Sphinx sources for the documentation. Thanks @gferreira (#935).
- [fvar] Expose flags in XML (#932)
- [name] Add helper function for building multi-lingual names (#921)
- [varLib] Fixed kern merging when a PairPosFormat2 has ClassDef1 with glyphs that are NOT present in the Coverage (1b5e1c4, #939).
- [varLib] Fixed non-deterministic ClassDef order with PY3 (f056c12, #927).
- [feLib] Throw an error when the same glyph is defined in multiple mark classes within the same lookup (3e3ff00, #453).
- [varLib] Added support for building
avartable, using the designspace<map>elements. - [varLib] Removed unused
build(..., axisMap)argument. Axis map should be specified in designspace file now. We do not accept nonstandard axes if<axes>element is not present. - [varLib] Removed "custom" axis from the
standard_axis_map. This was added before when glyphsLib was always exporting the (unused) custom axis. - [varLib] Added partial support for building
MVARtable; does not implementgasptable variations yet. - [pens] Added FilterPen base class, for pens that control another pen;
factored out
addComponentmethod from BasePen into a separate abstract DecomposingPen class; added DecomposingRecordingPen, which records components decomposed as regular contours. - [TSI1] Fixed computation of the textLength of VTT private tables (#913).
- [loggingTools] Added
LogMixinclass providing alogproperty to subclasses, which returns alogging.Loggernamed after the latter. - [loggingTools] Added
assertRegexmethod toCapturingLogHandler. - [py23] Added backport for python 3's
types.SimpleNamespaceclass. - [EBLC] Fixed issue with python 3
zipiterator.
- [pens] Added pen to draw glyphs using WxPython
GraphicsPathclass: https://wxpython.org/docs/api/wx.GraphicsPath-class.html - [varLib.merger] Fixed issue with recombining multiple PairPosFormat2 subtables (#888)
- [varLib] Do not encode gvar deltas that are all zeroes, or if all values are smaller than tolerance.
- [ttLib] _TTGlyphSet glyphs now also have
heightandtsb(top side bearing) attributes from thevmtxtable, if present. - [glyf] In
GlyphCoordintesclass, added__bool__/__nonzero__methods, andarrayproperty to get raw array. - [ttx] Support reading TTX files with BOM (#896)
- [CFF2] Fixed the reporting of the number of regions in the font.
- [varLib.merger] Fixed issue while recombining multiple PairPosFormat2 subtables if they were split because of offset overflows (9798c30).
- [varLib.merger] Only merge multiple PairPosFormat1 subtables if there is at least one of the fonts with a non-empty Format1 subtable (0f5a46b).
- [varLib.merger] Fixed IndexError with empty ClassDef1 in PairPosFormat2 (aad0d46).
- [varLib.merger] Avoid reusing Class2Record (mutable) objects (e6125b3).
- [varLib.merger] Calculate ClassDef1 and ClassDef2's Format when merging PairPosFormat2 (23511fd).
- [macUtils] Added missing ttLib import (b05f203).
- [feaLib] Added (partial) support for parsing feature file comments
# ...appearing in between statements (#879). - [feaLib] Cleaned up syntax tree for FeatureNames.
- [ttLib] Added support for reading/writing
CFF2table (thanks to @readroberts at Adobe), andTTFA(ttfautohint) table. - [varLib] Fixed regression introduced with 3.8.0 in the calculation of
NumShorts, i.e. the number of deltas in ItemVariationData's delta sets that use a 16-bit representation (b2825ff).
- New pens: MomentsPen, StatisticsPen, RecordingPen, and TeePen.
- [misc] Added new
fontTools.misc.symfontmodule, for symbolic font statistical analysis; requiressympy(http://www.sympy.org/en/index.html) - [varLib] Added experimental
fontTools.varLib.interpolatablemodule for finding wrong contour order between different masters - [varLib] designspace.load() now returns a dictionary, instead of a tuple, and supports <axes> element (#864); the 'masters' item was renamed 'sources', like the <sources> element in the designspace document
- [ttLib] Fixed issue with recalculating
headmodified timestamp when saving CFF fonts - [ttLib] In TupleVariation, round deltas before compiling (#861, fixed #592)
- [feaLib] Ignore duplicate glyphs in classes used as MarkFilteringSet and MarkAttachmentType (#863)
- [merge] Changed the
gasptable merge logic so that only the one from the first font is retained, similar to other hinting tables (#862) - [Tests] Added tests for the
varLibpackage, as well as test fonts from the "Annotated OpenType Specification" (AOTS) to exercisettLib's table readers/writers (<https://github.com/adobe-type-tools/aots>)
- [subset] Keep advance widths when stripping ".notdef" glyph outline in CID-keyed CFF fonts (#845)
- [feaLib] Zero values now produce the same results as makeotf (#633, #848)
- [feaLib] More compact encoding for “Contextual positioning with in-line single positioning rules” (#514)
- [subset] Fixed issue with
--no-hintingoption whereby advance widths in Type 2 charstrings were also being stripped (#709, #343) - [feaLib] include statements now resolve relative paths like makeotf (#838)
- [feaLib] table
namenow handles Unicode codepoints beyond the Basic Multilingual Plane, also supports old-style MacOS platform encodings (#842) - [feaLib] correctly escape string literals when emitting feature syntax (#780)
- [ttx, mtiLib] Preserve ordering of glyph alternates in GSUB type 3 (#833).
- [feaLib] Glyph names can have dashes, as per new AFDKO syntax v1.20 (#559).
- [feaLib] feaLib.Parser now needs the font's glyph map for parsing.
- [varLib] Fix regression where GPOS values were stored as 0.
- [varLib] Allow merging of class-based kerning when ClassDefs are different
- [varLib] Fix building variation of PairPosFormat2 (b5c34ce).
- Populate defaults even for otTables that have postRead (e45297b).
- Fix compiling of MultipleSubstFormat1 with zero 'out' glyphs (b887860).
- [varLib.merger] Fixed "TypeError: reduce() of empty sequence with no initial value" (3717dc6).
- [py23] Fixed unhandled exception occurring at interpreter shutdown in the "last resort" logging handler (972b3e6).
- [agl] Ensure all glyph names are of native 'str' type; avoid mixing 'str' and 'unicode' in TTFont.glyphOrder (d8c4058).
- Fixed inconsistent title levels in README.rst that caused PyPI to incorrectly render the reStructuredText page.
- [varLib] Refactored and improved the variation-font-building process.
- Assembly code in the fpgm, prep, and glyf tables is now indented in
XML output for improved readability. The
instructionelement is written as a simple tag if empty (#819). - [ttx] Fixed 'I/O operation on closed file' error when dumping multiple TTXs to standard output with the '-o -' option.
- The unit test modules (
*_test.py) have been moved outside of the fontTools package to the Tests folder, thus they are no longer installed (#811).
- Font tables read from XML can now be written back to XML with no loss.
- GSUB/GPOS LookupType is written out in XML as an element, not comment. (#792)
- When parsing cmap table, do not store items mapped to glyph id 0. (#790)
- [otlLib] Make ClassDef sorting deterministic. Fixes #766 (7d1ddb2)
- [mtiLib] Added unit tests (#787)
- [cvar] Implemented cvar table
- [gvar] Renamed GlyphVariation to TupleVariation to match OpenType terminology.
- [otTables] Handle gracefully empty VarData.Item array when compiling XML. (#797)
- [varLib] Re-enabled generation of
HVARtable for fonts with TrueType outlines; removed--build-HVARcommand-line option. - [feaLib] The parser can now be extended to support non-standard
statements in FEA code by using a customized Abstract Syntax Tree.
See, for example,
feaLib.builder_test.test_extensionsand baseClass.feax (#794, fixes #773). - [feaLib] Added
feaLibcommand to the 'fonttools' command-line tool; applies a feature file to a font.fonttools feaLib -hfor help. - [pens] The
T2CharStringPennow takes an optionalroundToleranceargument to control the rounding of coordinates (#804, fixes #769). - [ci] Measure test coverage on all supported python versions and OSes, combine coverage data and upload to https://codecov.io/gh/fonttools/fonttools (#786)
- [ci] Configured Travis and Appveyor for running tests on Python 3.6 (#785, 55c03bc)
- The manual pages installation directory can be customized through
FONTTOOLS_MANPATHenvironment variable (#799, fixes #84). - [Snippets] Added otf2ttf.py, for converting fonts from CFF to TrueType using the googlei18n/cu2qu module (#802)
- [feaLib] Added support for generating FEA text from abstract syntax tree (AST) objects (#776). Thanks @mhosken
- Added
agl.toUnicodefunction to convert AGL-compliant glyph names to Unicode strings (#774) - Implemented MVAR table (b4d5381)
- [setup] We no longer use versioneer.py to compute fonttools version
from git metadata, as this has caused issues for some users (#767).
Now we bump the version strings manually with a custom
releasecommand of setup.py script.
- [ttLib] Implemented STAT table from OpenType 1.8 (#758)
- [cffLib] Fixed decompilation of CFF fonts containing non-standard key/value pairs in FontDict (issue #740; PR #744)
- [py23] minor: in
round3function, allow the second argument to beNone(#757) - The standalone
sstructandxmlWritermodules, deprecated since vesion 3.2.0, have been removed. They can be imported from thefontTools.miscpackage.
- [py23] optimized performance of round3 function; added backport for py35 math.isclose() (9d8dacb)
- [subset] fixed issue with 'narrow' (UCS-2) Python 2 builds and
--text/--text-fileoptions containing non-BMP chararcters (16d0e5e) - [varLib] fixed issuewhen normalizing location values (8fa2ee1, #749)
- [inspect] Made it compatible with both python2 and python3 (167ee60, #748). Thanks @pnemade
- [varLib] Do not emit null axes in fvar (1bebcec). Thanks @robmck-ms
- [varLib] Handle fonts without GPOS (7915a45)
- [merge] Ignore LangSys if None (a11bc56)
- [subset] Fix subsetting MathVariants (78d3cbe)
- [OS/2] Fix "Private Use (plane 15)" range (08a0d55). Thanks @mashabow
- [OS/2] fix checking
fsSelectionbits matchinghead.macStylebits - [varLib] added
--build-HVARoption to generateHVARtable for fonts with TrueType outlines. ForCFF2, it is enabled by default.
- [varLib] Improve support for OpenType 1.8 Variable Fonts:
- Implement GDEF's VariationStore
- Implement HVAR/VVAR tables
- Partial support for loading MutatorMath .designspace files with varLib.designspace module
- Add varLib.models with Variation fonts interpolation models
- Implement GSUB/GPOS FeatureVariations
- Initial support for interpolating and merging OpenType Layout tables
(see
varLib.interpolate_layoutandvarLib.mergermodules) - [API change] Change version to be an integer instead of a float in XML output for GSUB, GPOS, GDEF, MATH, BASE, JSTF, HVAR, VVAR, feat, hhea and vhea tables. Scripts that set the Version for those to 1.0 or other float values also need fixing. A warning is emitted when code or XML needs fix.
- several bug fixes to the cffLib module, contributed by Adobe's @readroberts
- The XML output for CFF table now has a 'major' and 'minor' elements for specifying whether it's version 1.0 or 2.0 (support for CFF2 is coming soon)
- [setup.py] remove undocumented/deprecated
extra_pathDistutils argument. This means that we no longer create a "FontTools" subfolder in site-packages containing the actual fontTools package, as well as the standalone xmlWriter and sstruct modules. The latter modules are also deprecated, and scheduled for removal in upcoming releases. Please change your import statements to point to from fontTools.misc import xmlWriter and from fontTools.misc import sstruct. - [scripts] Add a 'fonttools' command-line tool that simply runs
fontTools.*sub-modules: e.g.fonttools ttx,fonttools subset, etc. - [hmtx/vmts] Read advance width/heights as unsigned short (uint16); automatically round float values to integers.
- [ttLib/xmlWriter] add 'newlinestr=None' keyword argument to
TTFont.saveXMLfor overriding os-specific line endings (passed on toXMLWriterinstances). - [versioning] Use versioneer instead of
setuptools_scmto dynamically load version info from a git checkout at import time. - [feaLib] Support backslash-prefixed glyph names.
- restore Makefile as an alternative way to build/check/install
- README.md: update instructions for installing package from source, and for running test suite
- NEWS: Change log was out of sync with tagged release
- Fix
ttLibVersionattribute in TTX files still showing '3.0' instead of '3.1'. - Use
setuptools_scmto manage package versions.
- [feaLib] New library to parse and compile Adobe FDK OpenType Feature files.
- [mtiLib] New library to parse and compile Monotype 'FontDame' OpenType Layout Tables files.
- [voltLib] New library to parse Microsoft VOLT project files.
- [otlLib] New library to work with OpenType Layout tables.
- [varLib] New library to work with OpenType Font Variations.
- [pens] Add ttGlyphPen to draw to TrueType glyphs, and t2CharStringPen to draw to Type 2 Charstrings (CFF); add areaPen and perimeterPen.
- [ttLib.tables] Implement 'meta' and 'trak' tables.
- [ttx] Add --flavor option for compiling to 'woff' or 'woff2'; add
--with-zopflioption to use Zopfli to compress WOFF 1.0 fonts. - [subset] Support subsetting 'COLR'/'CPAL' and 'CBDT'/'CBLC' color fonts tables, and 'gvar' table for variation fonts.
- [Snippets] Add
symfont.py, for symbolic font statistics analysis; interpolatable.py, a preliminary script for detecting interpolation errors;{merge,dump}_woff_metadata.py. - [classifyTools] Helpers to classify things into classes.
- [CI] Run tests on Windows, Linux and macOS using Appveyor and Travis CI; check unit test coverage with Coverage.py/Coveralls; automatic deployment to PyPI on tags.
- [loggingTools] Use Python built-in logging module to print messages.
- [py23] Make round() behave like Python 3 built-in round(); define round2() and round3().
- Add Snippet scripts for cmap subtable format conversion, printing GSUB/GPOS features, building a GX font from two masters
- TTX WOFF2 support and a
-foption to overwrite output file(s) - Support GX tables:
avar,gvar,fvar,meta - Support
featand gzip-compressed SVG tables - Upgrade Mac East Asian encodings to native implementation if available
- Add Roman Croatian and Romanian encodings, codecs for mac-extended East Asian encodings
- Implement optimal GLYF glyph outline packing; disabled by default
- Add a Qt pen
- Add VDMX table converter
- Load all OpenType sub-structures lazily
- Add support for cmap format 13.
- Add pyftmerge tool
- Update to Unicode 6.3.0d3
- Add pyftinspect tool
- Add support for Google CBLC/CBDT color bitmaps, standard EBLC/EBDT
embedded bitmaps, and
SVGtable (thanks to Read Roberts at Adobe) - Add support for loading, saving and ttx'ing WOFF file format
- Add support for Microsoft COLR/CPAL layered color glyphs
- Support PyPy
- Support Jython, by replacing numpy with array/lists modules and removed it, pure-Python StringIO, not cStringIO
- Add pyftsubset and Subsetter object, supporting CFF and TTF
- Add to ttx args for -q for quiet mode, -z to choose a bitmap dump format
- Option to write to arbitrary files
- Better dump format for DSIG
- Better detection of OTF XML
- Fix issue with Apple's kern table format
- Fix mangling of TT glyph programs
- Fix issues related to mona.ttf
- Fix Windows Installer instructions
- Fix some modern MacOS issues
- Fix minor issues and typos
- TrueType Collection (TTC) support
- Python 2.6 support
- Update Unicode data to 5.2.0
- Couple of bug fixes
- ClearType support
- cmap format 1 support
- PFA font support
- Switched from Numeric to numpy
- Update Unicode data to 5.1.0
- Update AGLFN data to 1.6
- Many bug fixes
- Many years worth of fixes and features
- Be "forgiving" when interpreting the maxp table version field: interpret any value as 1.0 if it's not 0.5. Fixes dumping of these GPL fonts: http://www.freebsd.org/cgi/pds.cgi?ports/chinese/wangttf
- Fixed ttx -l: it turned out this part of the code didn't work with Python 2.2.1 and earlier. My bad to do most of my testing with a different version than I shipped TTX with :-(
- Fixed bug in ClassDef format 1 subtable (Andreas Seidel bumped into this one).
- Fixed embarrassing bug: the master checksum in the head table is now calculated correctly even on little-endian platforms (such as Intel).
- Made the cmap format 4 compiler smarter: the binary data it creates is now more or less as compact as possible. TTX now makes more compact data than in any shipping font I've tested it with.
- Dump glyph names as a separate "GlyphOrder" pseudo table as opposed to as part of the glyf table (obviously needed for CFF-OTF's).
- Added proper support for the CFF table.
- Don't barf on empty tables (questionable, but "there are font out there...")
- When writing TT glyf data, align glyphs on 4-byte boundaries. This seems to be the current recommendation by MS. Also: don't barf on fonts which are already 4-byte aligned.
- Windows installer contributed bu Adam Twardoch! Yay!
- Changed the command line interface again, now by creating one new tool replacing the old ones: ttx It dumps and compiles, depending on input file types. The options have changed somewhat.
- The -d option is back (output dir)
- ttcompile's -i options is now called -m (as in "merge"), to avoid clash with dump's -i.
- The -s option ("split tables") no longer creates a directory, but instead outputs a small .ttx file containing references to the individual table files. This is not a true link, it's a simple file name, and the referenced file should be in the same directory so ttcompile can find them.
- compile no longer accepts a directory as input argument. Instead it can parse the new "mini-ttx" format as output by "ttx -s".
- all arguments are input files
- Renamed the command line programs and moved them to the Tools subdirectory. They are now installed by the setup.py install script.
- Added OpenType support. BASE, GDEF, GPOS, GSUB and JSTF are (almost) fully supported. The XML output is not yet final, as I'm still considering to output certain subtables in a more human-friendly manner.
- Fixed 'kern' table to correctly accept subtables it doesn't know about, as well as interpreting Apple's definition of the 'kern' table headers correctly.
- Fixed bug where glyphnames were not calculated from 'cmap' if it was (one of the) first tables to be decompiled. More specifically: it cmap was the first to ask for a glyphID -> glyphName mapping.
- Switched XML parsers: use expat instead of xmlproc. Should be faster.
- Removed my UnicodeString object: I now require Python 2.0 or up, which has unicode support built in.
- Removed assert in glyf table: redundant data at the end of the table is now ignored instead of raising an error. Should become a warning.
- Fixed bug in hmtx/vmtx code that only occured if all advances were equal.
- Fixed subtle bug in TT instruction disassembler.
- Couple of fixes to the 'post' table.
- Updated OS/2 table to latest spec.
- Reorganized the command line interface for ttDump.py and ttCompile.py, they now behave more like "normal" command line tool, in that they accept multiple input files for batch processing.
- ttDump.py and ttCompile.py don't silently override files anymore, but ask before doing so. Can be overridden by -f.
- Added -d option to both ttDump.py and ttCompile.py.
- Installation is now done with distutils. (Needs work for environments without compilers.)
- Updated installation instructions.
- Added some workarounds so as to handle certain buggy fonts more gracefully.
- Updated Unicode table to Unicode 3.0 (Thanks Antoine!)
- Included a Python script by Adam Twardoch that adds some useful stuff to the Windows registry.
- Moved the project to SourceForge.
- Big reorganization: made ttLib a subpackage of the new fontTools package, changed several module names. Called the entire suite "FontTools"
- Added several submodules to fontTools, some new, some older.
- Added experimental CFF/GPOS/GSUB support to ttLib, read-only (but XML dumping of GPOS/GSUB is for now disabled)
- Fixed hdmx endian bug
- Added -b option to ttCompile.py, it disables recalculation of bounding boxes, as requested by Werner Lemberg.
- Renamed tt2xml.pt to ttDump.py and xml2tt.py to ttCompile.py
- Use ".ttx" as file extension instead of ".xml".
- TTX is now the name of the XML-based format for TT fonts, and not just an application.
Never released
- More tables supported: hdmx, vhea, vmtx
Never released
- fixed most portability issues
- retracted the "Euro_or_currency" change from 1.0a2: it was nonsense!
- binary release for MacOS
- genenates full FOND resources: including width table, PS font name info and kern table if applicable.
- added cmap format 4 support. Extra: dumps Unicode char names as XML comments!
- added cmap format 6 support
- now accepts true type files starting with "true" (instead of just 0x00010000 and "OTTO")
- 'glyf' table support is now complete: I added support for composite scale, xy-scale and two-by-two for the 'glyf' table. For now, component offset scale behaviour defaults to Apple-style. This only affects the (re)calculation of the glyph bounding box.
- changed "Euro" to "Euro_or_currency" in the Standard Apple Glyph order list, since we cannot tell from the 'post' table which is meant. I should probably doublecheck with a Unicode encoding if available. (This does not affect the output!)
Fixed bugs: - 'hhea' table is now recalculated correctly - fixed wrong assumption about sfnt resource names
- initial binary release for MacOS