Releases: fonttools/fonttools
Releases · fonttools/fonttools
4.35.0
- [otData/otConverters] Added support for 'biased' PaintSweepGradient start/end angles to match latest COLRv1 spec (#2743).
- [varLib.instancer] Fixed bug in
_instantiateFeatureVariations
when at the same time pinning one axis and restricting the range of a subsequent axis; the wrong axis tag was being used in the latter step (as the records' axisIdx was updated in the preceding step but looked up using the old axes order in the following step) (#2733, #2734). - [mtiLib] Pad script tags with space when less than 4 char long (#1727).
- [merge] Use
'.'
instead of'#'
in duplicate glyph names (#2742). - [gvar] Added support for lazily loading glyph variations (#2741).
- [varLib] In
build_many
, we forgot to pass oncolr_layer_reuse
parameter to thebuild
method (#2730). - [svgPathPen] Add a main that prints SVG for input text (6df779f).
- [cffLib.width] Fixed off-by-one in optimized values; previous code didn't match the code block above it (2963fa5).
- [varLib.interpolatable] Support reading .designspace and .glyphs files (via optional
glyphsLib
). - Compile some modules with Cython when available and building/installing fonttools from source:
varLib.iup
(35% faster),pens.momentsPen
(makesvarLib.interpolatable
3x faster). - [feaLib] Allow features to be built for VF without also building a GDEF table (e.g. only build GSUB); warn when GDEF would be needed but isn't requested (#2705, #2694).
- [otBase] Fixed
AttributeError
when uharfbuzz < 0.23.0 andrepack
method is missing (32aa8ea).
Use newuharfbuzz.repack_with_tag
when available (since uharfbuzz>=0.30.0), enables table-specific optimizations to be performed during repacking (#2724). - [statisticsPen] By default report all glyphs (4139d89). Avoid division-by-zero (52b28f9).
- [feaLib] Added missing required argument to FeatureLibError exception (#2693)
- [varLib.merge] Fixed error during error reporting (#2689). Fixed undefined
NotANone
variable (#2714).
4.34.4
4.34.3
4.34.2
4.34.1
- [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.
4.34.0
- [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
compressed
field, 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).
4.33.3
4.33.2
- [otBase] Make logging less verbose when harfbuzz fails to serialize (#2593).
Do not exit at the first failure but continue attempting to fix offset overflow error using the pure-python serializer even when theUSE_HARFBUZZ_REPACKER
option was explicitly set toTrue
. This is normal with fonts with relatively large tables, at least until hb.repack implements proper table splitting.
4.33.1
4.33.0
- [OS/2 / merge] Automatically recalculate
OS/2.xAvgCharWidth
after merging fonts withfontTools.merge
(#2591, #2538). - [misc/config] Added
fontTools.misc.configTools
module, a generic configuration system (#2416, #2349).
AddedfontTools.config
module, a fontTools-specific configuration system usingconfigTools
above.
Attached aConfig
object 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.
AddedfontTools.designspaceLib.split
module 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.statNames
module.
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_many
to build several variable fonts from a single designspace document (#2436).
AddedfontTools.varLib.stat
module to build STAT tables from a designspace document. - [otBase] Try to use the Harfbuzz Repacker for packing GSUB/GPOS tables when
uharfbuzz
python 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 toTrue
butuharfbuzz
can'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).