Repository navigation
Releases
Releases Β· fonttools/fonttools
4.69.1
4.69.0
- [svgPathPen] Add opt-in
precisionparameter toSVGPathPen(and--precisionCLI option, defaulting to 2 decimal places) for rounded, compact numbers (#3547, #4358). - [subset] Add
--retain-all-variation-sequencesoption to retain all Unicode variation sequences for selected base codepoints without listing selectors explicitly (#3865, #4353). - [merge] Print usage and exit cleanly for
pyftmerge --help/-h(#524, #4356). - [cmap] Reject format 2 subtables where a byte is used as both a single-byte code and a two-byte lead byte instead of silently dropping mappings (#1524, #4324).
- [glyf] Round component XY offsets when calculating glyph bounds so instanced bounds match the compiled table (#3795, #4374).
- [feaLib/otlLib] Preserve the given contour point order for
LigatureCaretByIndexrules instead of sorting point indices (#3608, #4357). - [otlLib] Fix shadowed class-pair kerning rules in
ClassPairPosSubtableBuilderby partitioning overlapping first-glyph classes while preserving pair iteration order (#2793, #4381). - [varLib.iup] Validate IUP optimization both before and after rounding coordinates and explicit deltas (#3636, #4382).
- [otlLib] Balance
SingleSubstsubtable splitting by total lookup size times subtable count (#3259, #4383). - [varLib.interpolatable] Handle sparse Designspace sources (separate UFOs or named layers) without spurious missing-glyph errors (#4385, #4386).
- [cffLib] Reconnect
CharStrings.varStoreafter importing a variable CFF2 font from TTX sogetGlyphSet(location=...)renders variations (#4387, #4388). - [misc.filesystem] Fall back to copying over the target in
WriteZipFS.close()whenos.replace()raisesPermissionErroron Windows, fixing saving.ufozfiles already open for reading (#4391, #4392). - [cffLib] Speed up subroutine renumbering by avoiding repeated linear index searches (#4390).
- [setup.py] Force Cython regeneration on free-threaded Python builds so published
cp313t/cp314twheels do not re-enable the GIL on import (#4393, #4394). - [unicodedata] Generate
Mirrored.pybidi mirroring data viaMetaTools/buildUCD.py(#3810, #4399). - [subset] Map
Devicevariation indices whose delta sets are missing fromGDEFVarStoretoNO_VARIATION_INDEX(#4396). - [cffLib] Fix 4.68.0 regressions in
CFF2ToCFF(loadFDSelectbefore dropping the CFF2 glyph order, #4401) andCFFToCFF2(load glyph order before removing theCFFtable, #4404). - [subset] Make
COLRv0 layer ordering in COLRv1 tables (#4402) and tie-breaking forbsln/propdefault values (#4418) deterministic across runs. - [merge] Accept in-memory
TTFontobjects alongside filenames inMerger.merge()(#3764, #4407), and handle oversized BMPcmapformat 4 subtables cleanly (#3698, #4408). - [scaleUpem] Avoid emitting
PaintScaleUniformwhen scaling a COLRv1 font by a factor of 2, which overflowsF2Dot14(#4405). - [reorderGlyphs] Fix
CFF2charstring loading before reordering (#4411), reorderFDSelectfor CID-keyedCFF/CFF2fonts (#4416), and skip null coverages such asMATHtables without horizontal variants (#4412). - [psCharStrings] Ignore unknown or reserved Type 1 and Type 2 charstring operators instead of silently truncating the charstring (#4410).
- [subset] Skip
--recalc-max-contextwhen theOS/2table is version 0 or 1, which lackusMaxContext(#4417). - [cu2qu.ufo] Do not mark glyphs as modified or redraw curves when
all_quadratic=Falseleaves them cubic (#4419). - [ttLib] Apply
--optimize-font-speedto every font, including fonts inside collections (.ttc/.otc) (#4420). - [diff] Fix
--color autoTTY detection,-twith only identical tables, and errors during the binary check (#4421). - [subset] Preserve all standard
nameIDs (0-255) by default inpyftsubset(#4400, #4403). - [varLib.avar] Add reverse coordinate mapping for avar v1 and v2 (
varLib.avar.reverseandavar.map(..., reverse=True)) with reusable forward/reverse mappers, jump-boundary handling, and a compiled fast path (#4424, #4432, #4433, #4434). - [varLib.avar] Add
analyze,reachability, andplotAPIs and CLIs for inspecting avar mappings (#4444), handle default locations consistently invarLib.avar.map(#4425), and returnvarLib.avar.plan's exit code fromvarLib.avarPlanner(#4428). - [mtiLib] Match
subtable endcase-insensitively so uppercase variants do not hang parsing (#4429). - [fontBuilder] Key axes by name in
FontBuilder.setupAvar()so Designspace-styleAxisMappingDescriptoravar 2 mappings work (#4426). - [feaLib] Warn and skip duplicate
languagesystemstatements instead of raising an error (#4423). - [varLib.interpolatable] Show normalized and lazy input coordinates for master and midway locations (#4431, #4432), restrict master-tree comparisons to compatible axis subspaces with
--show-graphand opt-in terminal progress reporting (#4440), and confirm candidate kink/underweight reports at the actual normalized midpoint (#4441). - [varLib.interpolatable] Add
-j/--jobsbatched worker processes (#4442) and reuse expanded component outlines across statistics passes (#4443). - [ttGlyphSet] Speed up TrueType variable glyph instancing by accumulating scaled
gvardeltas in a single pass (#4445). - [designspaceLib] Validate
processingacross multiple<rules>elements and reject conflicting values (#4409, #4439). - [varLib.instancer] Cull
avarv2 variation regions that touch the reachable range only at a zero-support endpoint (#4449). - [subset] Remap and retain component glyph IDs for composite
EBDT/CBDTbitmap glyphs (formats 8 and 9) (#4413, #4453). - [cu2qu] Compute the required number of quadratic segments directly in
curve_to_quadratic()instead of trial-building splines (#4452). - [ttLib] SECURITY Bound WOFF and WOFF2 font data and metadata decompression against memory-exhaustion denial of service (
GHSA-868m-5w35-h9cq): enforce configurable pre-decompression size and ratio limits infontTools.ttLib.sfnt(WOFF_MAX_DECOMPRESSED_SIZE,WOFF_MAX_METADATA_SIZE,WOFF_MAX_COMPRESSION_RATIO,WOFF_MIN_RATIO_CHECK_SIZE), switch zlib and Brotli decoding to bounded streaming (with a chunked fallback forbrotli < 1.2.0), and read table, metadata, and private payloads in bounded chunks. Private_decompress(rawData, expectedSize)helpers now requireexpectedSize. - [qu2cu] Stop the curve fit test after 64 halvings and on a NaN error, as cu2qu now does, so near-tolerance curves no longer recurse without end (a crash in the compiled module); a NaN
max_errnow raisesValueError(#4455). - [head] Fix the offset added to very low
created/modifiedtimestamps that are read as Unix time, which fell 4800 seconds short of the 1970 epoch (#4456). - [ttx] Show the axis name in a comment beside
AxisIndexvalues inSTATXML dumps (#3219, #4398).
Note: please use 4.69.1 instead. Uploading this release hit PyPI's project size limit, so most of its files were uploaded by hand without provenance attestations; 4.69.1 is the same code re-released through CI (#4461).
4.68.0
- [feaLib] Escape
"and\when writing names back out withasFea()inFeatureNameStatement,STATNameStatementandCVParametersNameStatement(#4321). - [scaleUpem] Also scale the
MATHlengths that are notMathValueRecords (DelimitedSubFormulaMinHeight,DisplayOperatorMinHeight,MinConnectorOverlap, etc.) (#4327). - [cffLib] Inherit the initial CFF2
vsindexfrom the Private DICT when decompiling, specializing and instancing charstrings, and fixprogramToCommandsmiscounting operands when severalblendoperators precede the first stem or moveto (#4337, #4339). - [instancer] Round CFF2 outlines and stem hints on absolute positions rather than per relative operand, and keep CFF2 Private DICT blend values at full precision until they are written back (#4338, #4341).
- [cffLib] Preserve CFF2 Private DICT arrays that use more than one
blendgroup (#4346). - [feaLib] Raise
FeatureLibErrorinstead of looping forever on an unclosedOS/2,BASEorSTATtable block (#4347). - [designspaceLib] When a variable font overrides some
public.fontInfokeys, merge them with the root-level font info instead of replacing it (#4336, #4340). - [instancer] Raise an error for
FeatureVariationsconditions of a format other than the supported axis-range one, instead of silently dropping them (#4348). - [filesystem] Don't overwrite an unrelated sibling
.zipwhen writing a.ufozor other non-.ziparchive (#4342). - [glyf] Fix exponential running time on composite glyphs that reuse the same component at several nesting levels;
getCoordinatesnow raisesTTLibErrorpast 65535 composite points (#4325). - [ttLib] Add support for the beyond-64k tables of the final ISO Open Font Format 5th edition: uppercase companion tables (
GLYF,GVAR,HMTX, GSUB/GPOS extended layout,FeatureVariations1.1, TTC 1.1/2.1,DMAP), attLib.beyond64kmodule and CLI, and support inFontBuilder,merge,subset,instancer,qu2cu,removeOverlapsandscaleUpem(#4097, #2678). - [VARC] Keep
addVarComponent()locations sparse, passingRESET_UNSPECIFIED_AXESvia a new keyword-onlyresetUnspecifiedAxespen argument (#4349). - [woff] Require
brotli>= 1.2.1 andbrotlicffi>= 1.2.1.0, which fix GHSA-9v8h-qqgm-4m35 (#4365, #4370). - Build Windows ARM64 wheels (#4366).
- [instancer] Fix
AttributeError: ElidedFallbackNameIDwhen updating font names of a font with a version 1.0STATtable; fall back to the subfamily name (#2933, #4371).
4.67.0
- [varLib] Support decreasing design-space axis mappings, via a new keyword-only
allow_decreasingargument tomodels.normalizeValue(#3970, #4217, #4243). - [designspaceLib] Allow partial DesignSpace v5 axis subsets: omitted range attributes on an
<axis-subset>are taken from the parent axis, as the spec says (#4205). - [designspaceLib] Fix
DesignSpaceDocument.normalize()for mapped axes: axis bounds and rule conditions are now normalized from their original values (#4218). - [designspaceLib]
splitInterpolableandsplitVariableFontsnow warn when a source or instance is dropped because it lies outside the document's own axes, instead of silently discarding it (#4244). - [varLib.instancer] Add support for instancing variable COLRv1 fonts (#2699, #4279).
- [varLib.instancer] Apply VVAR vertical-origin deltas to
VORG, and use OpenType rounding for instanced advances and vertical origins (#4221). - [varLib.instancer] Keep a universal FeatureVariations record when pinning removes its last condition but other axes remain (#4247).
- [varLib.instancer] Preserve ppem
Devicecorrections in GDEF, BASE, GPOS and JSTF instead of asserting on them (#4290). - [varLib.instancer] Allow requesting an axis's original range on VARC fonts (#4280).
- [varLib.instancer, subset] Fold, remove or remap MATH
VariationIndexdevices when instancing, subsetting the GDEF store or optimizing it (#4288). - [varLib] Raise
ValueError: Missing required table fvarfromvarLib.mutatorand the instancer CLI on a static font, instead of a bareKeyError(#3751, #4300). - [featureVars] When adding
rvrn, also shift lookup indices inside existing FeatureVariations (#4233). Handle nullConditionSetandFeatureTableSubstitutionoffsets when building, subsetting and instancing (#4234, #4235). KeepFeatureTableSubstitutionrecords sorted after merging new ones into an existing record (#4248). - [ttLib] Fix FeatureParams (
size,ssXX,cvXX) in FeatureVariations alternate feature tables, which failed to compile and round-trip (#3623, #4278). - [ttLib] Fully decode lazily loaded ligatures,
SinglePosandPairPosarrays during recursive decompilation, soreorderGlyphs()on a lazy font no longer corrupts or asserts on them (#4231, #4232). - [VARC] Update the variation-store binary format to follow harfbuzz/boring-expansion-spec#175:
SparseVarRegionList.RegionCountis uint32, sparse axes use Offset32 andMultiVarDataitems are stored in an INDEX. VARC fonts built with earlier fontTools versions must be rebuilt (#4219). - [VARC] Several fixes: derive component conditions from
conditionIndex(#4237), set the implicitscaleYwhen importing XML (#4238), report the font's current coordinates for components that reset unspecified axes (#4239), and keep inherited coordinates when drawing CFF2 VARC components (#4236). - [varLib]
buildMultiVarDataaccepts flattened per-region vector tuples (#4245). - [otConverters] Bounds-check CFF2 INDEX count and
offSizeon read, raisingTTLibErrorinstead of allocating huge lazy lists (#4220). - [ttLib] Handle empty packed deltas when
OPTIMIZE_FONT_SPEEDis set (#4241). - [scaleUpem] Scale per-glyph
VORGorigins (#4222); fix VARC scaling for static fonts and condition variations (#4223); don't mutate the shared default CFFFontMatrix(#4251, #4252). - [cmap] Fix format 2 compilation when all codes are single-byte (#1524, #4211) or all single-byte codes map to
.notdef(#4215). Formats 2 and 4 now reject glyph IDs above 65535 instead of wrapping them (#4226). Split format 14 default UVS ranges longer than 256 codepoints (#4229). Empty format 12 and 13 subtables round-trip (#4246). - [glyf] Use unsigned instruction lengths, so programs of 32768-65535 bytes compile and decompile correctly (#4227). Keep instructions in zero-contour glyphs (#4228).
- [pens] Fix cubic off-curve detection in
TTGlyphPointPenacross contour starts (#4224).Glyph.drawPoints()now raisesNotImplementedErrorfor an all-off-curve cubic contour, which the point pen protocol cannot express (#3191, #4225).RoundingPenpasses the all-off-curveNonesentinel through (#4311, #4312). - [CFF2] Preserve operands when a blend has zero regions (#4240).
- [cffLib] Read CFF font names as Latin-1, matching how they are written (#4253). Deleting a CFF dict attribute now actually removes it (#2725, #4264).
- [CFF2ToCFF] Fix conversion of fonts with local subroutines (#4258). A CFF2 table with a single FontDict is now converted to a name-keyed CFF font that keeps its glyph names (#3890, #4265).
- [subset] Handle a null GDEF variation store (#4230).
- [merge] Support merging fonts that both have a MATH table (#3823, #4257).
- [feaLib] Reject the same mark class used twice in one anchor list (#3628, #4255). Don't crash on value records whose devices are all NULL (#2396, #4261). Pad a short OS/2
Vendorwith spaces (#4259). - [feaLib] Raise
FeatureLibErrorwith a location, instead of a bare Python error, for: a BASE script list without a matching tag list (#4263), aUnicodeRangebit outside 0-127 (#4266), a name string that cannot be decoded (#4267), a STAT axislocationwith no or too many values (#4268), and a non-ASCII OS/2Vendor(#4269). - [name] Fix the BCP 47 tags of some Mac and Windows language IDs, e.g.
eswas mapped to Mac Estonian (#3733, #4256).getDebugNameprefers the Windows English name over the Mac one (#3969, #4273). - [post] Don't crash on a format 2.0 table with
numGlyphsset to 0 (#3060, #4274). - [VDMX] Recompute
numRecsandnumRatioswhen compiling (#4293). - [Silf] Fix compiling a
Silftable that was decompiled from binary (#4294). - [woff2] Preserve
minorVersionwhen copying flavor data (#4249, #4250). - [ttGlyphSet] Compute glyph width lazily for glyf variable fonts without HVAR, so
.widthis correct before drawing (#3964, #4260). - [varLib.interpolatable] Respect designspace source layers (#3951, #4275); fix
--jsonoutput with SciPy (#3870, #4276). - [misc.psLib] Fix tokenizing of escaped parentheses in PostScript strings (#4207).
- [svgLib] Raise
ValueErrorinstead ofIndexErroron a truncated path command (#4254). - [misc.transform] Preserve the direction of the remaining axis when decomposing a transform whose first column is zero (#4242).
- [misc.textTools]
Tag.__ne__returnsNotImplementedfor unsupported types (#4305, #4306). - [misc.dictTools]
hashdictrejects in-place union (|=) (#4313, #4314). - [misc.xmlReader] Close owned input streams when parsing fails (#4298).
- [misc.filesystem]
WriteZipFS.close()can be called more than once (#4309, #4310). - [EBDT] Keep EBDT/CBDT glyph metrics after probing a missing attribute (#3806, #4216).
4.66.1
- [designspaceLib] When splitting a DesignSpace v5 document with
makeNames=True(asvarLib.build_manydoes), family and style names set explicitly on an instance now take precedence over the ones computed from the STAT labels, in all languages, and a PostScript name is no longer made up from the labels for an instance that has its own style name (#3131, #4206, #4208). - [cmap] Decompiling a format 4 subtable whose
idRangeOffsetpoints outsideglyphIndexArraynow raisesTTLibError. A negative index used to silently map the code point to the wrong glyph, and one past the end raised a bareAssertionError(#4209). - [cmap] Fix compiling a format 2 subtable when the lowest glyph ID in a lead-byte row is 32768 or higher, which failed with
struct.error(#4210).
4.66.0
- Drop support for EOL Python 3.10; fontTools now requires Python 3.11 or later.
fontTools.misc.enumToolsnow only re-exportsenum.StrEnumand is deprecated. Explicitly test and declare support for Python 3.15 (#4183, #4196). - [unicodedata] Update the bundled script, script extension, block and bidi-mirroring tables to Unicode 18.0.0, and require
unicodedata218.0.0 when it is used (#4192, #4197). - [feaLib] Support
languagestatements listing multiple language tags, e.g.language AZE CRT;, as Glyphs does and as proposed for the spec (adobe-type-tools/feature_file_workshops#8): the following rules and lookup references are registered under every listed language.dfltcannot be combined with other tags.LanguageStatement.languageis still the first tag; all of them are in the newlanguagesattribute (#4201, #4202). - [feaLib] Fix lookups being dropped when a
script/languagepair is repeated within a feature block: the repeated statement replaced the language system's lookups with a fresh copy of the default ones (#4189). - [feaLib] Raise
FeatureLibErrorinstead ofUnboundLocalErrorwhen aSTATtable block lacksElidedFallbackNameorElidedFallbackNameID(#3834, #4179). - [cffLib] Always recompile the CFF2
VarStorewhen saving. Previously the bytes compiled by an earlier save were reused, so a CFF2 variable font that was saved and then modified in place, e.g. by the instancer, was written with a staleVarStorenext to its updated charstrings (#4199). - [ttLib] Support static
VARCfonts that omitfvarwhile retaininggvaror CFF2 variation data for component-internal axes: hidden axes are addressed by index andgvarcan compile, decompile and round-trip through TTX withoutfvar, reading the axis count from a newaxisCountelement (#4187, #4188). - [ttLib] Fix drawing
VARCcomponents whose condition is negated (format 5), which raisedAttributeError(#4191). - [instancer] Fix
VARCaxis references left stale when removing an unrelated axis, reject pinning or restricting axes referenced byVARCcomponents, and stop culling avar2 ranges for component-internal variations, which can reach outside the font-level ranges (#4190, #4193). - [bezierTools] Preserve exact endpoints in
splitQuadraticAtTandsplitCubicAtTCas well, likesplitCubicAtTsince 4.55.4 (#3742, #4194). - [bezierTools] Fix
ZeroDivisionErrorinlineLineIntersectionsfor collinear vertical lines; they are now treated as parallel like horizontal ones (#3515, #4181). - [subset]
pyftsubsetnow preserves the input font's flavor (WOFF, WOFF2) when--flavoris omitted, instead of writing uncompressed sfnt data under the same extension; pass--flavor=noneto force uncompressed output (#3630, #4182). - [merge] Report incompatible
unitsPerEmvalues by name, with the input values, instead of a bare assertion (#2844, #4184). - [designspaceLib] Fix the type annotation and documentation of
DesignSpaceDocument.default, which holds aSourceDescriptor, not a source name (#2994, #4186). - [ttLib.sfnt] Raise
TTLibErrorinstead ofAssertionErrorfor inconsistent WOFF table, metadata and private-data lengths, so the checks also hold underpython -O(#4178). - [misc.etree] Disable entity resolution altogether on lxml >= 5.0 as well: lxml's
resolve_entities="internal"still fetched external parameter entities before lxml 6.1.3, so a crafted DTD could read local files into parsed XML content (#4195). - [cmap] Bound the expansion of format 4 segments and format 12/13 groups when decompiling, like HarfBuzz does: groups are clamped to U+10FFFF, inverted or overlapping groups are skipped with a warning, and groups mapped to the missing glyph are not expanded. A crafted font could previously exhaust memory with a single group ending at 0xFFFFFFFF (#4204).
- [varLib.avar] Escape axis names and tags when
varLib.avar.unbuildemits its designspace snippet, so a crafted font cannot inject markup (#4203).
4.65.0
- [glyf] Add
__iter__,itemsandvaluesmethods to theglyftable to make it more dict-like (#4156). - [feaLib] Escape the anonymous block tag when scanning for its terminator, so tags containing regex metacharacters are matched literally (#4167).
- [varLib] Strip directory components from
<variable-font name="..."/>when deriving the output filename in thevarLibcommand line, so a designspace cannot write outside the output directory (#4168). - [feaLib] Fix tracking of the current script and language across redundant
scriptstatements. Rules following ascriptstatement that names the first declared language system no longer end up under theDFLTscript, and ascriptstatement naming the already-current script still narrows the language systems and terminates the current lookup while leaving thelookupflagalone, matching makeotf (#1824, #2522, #4169). - [varLib.interpolatable] Escape glyph names in the HTML report (#4172).
- [otlLib] Fix overflow handling when building contextual lookups: offset overflows now raise
OTLOffsetOverflowErrorinstead ofAttributeErrorso another contextual format can be tried (regression from #3439). When all formats overflow, split the ruleset in halves until it fits (#4171).
4.64.0
- [feaLib] Fix name-table parsing for multibyte Mac encodings (#1196, #4092).
- [ttProgram] Also indent TrueType assembly following
IDEF[ ], like function definitions (#4093). - [subset] Keep East Asian spacing
paltby default (#4094). - [subset] Bug fix for MATH table in which constructions for glyphs that are only added during MATH closure were kept (#4096).
- [ufoLib] Make glyph-to-group construction accessible outside of lookup function (#4102).
- [glyf] Use reverse glyph map for O(1)
__setitem__membership (#4103). - [ttLib] Fix
fixLookupOverFlows()reporting success when it had not promoted any lookup to Extension, masking unresolvable overflows. - [ttLib] Add support for TrueType Collection version 2 (#4100).
- [ttLib] Pin a single head.modified timestamp across
TTCollection.save(#4111). - [ttLib] Give an actionable error when LookupList overflow is unrecoverable (#4109).
- [ttLib] Add support for the AAT bitmap tables
bhed,bdat,bloc, variants ofhead,EBDT,EBLCused in legacy Apple bitmap-only fonts (#4115). - [ttLib] Check
OS/2fsSelection/macStyle consistency againstbhedas well ashead(#4118, #4119). - [misc.roundTools] Add types and documentation (#4123).
- [varLib.instancer] Instance the
BASEtable (#4137). - [varLib.instancer] Fix Private-dict
vsindexhandling ininstantiateCFF2(#4129, #4132). - [varLib.instancer] Fix crash instancing CFF2 fonts without a VariationStore (#4130, #4131).
- [sfnt] Raise
TTLibErrorinstead ofAssertionErrororstruct.errorwhen reading a font truncated within the table directory or a table entry (#4147, #4149). - [misc.xmlWriter] Escape the
]]>terminator inside CDATA sections, so an SVG document containing it can no longer smuggle markup past a TTX round trip (#4139). - [varLib.instancer] Implement avar2 partial-instancing: the avar version 2 ItemVariationStore is adjusted so that remaining axes behave the same after limiting the designspace (#4045).
- [feaLib] Add shorthand for the value at the default location in a variable scalar:
(100 wght=900:120)means(wght=400:100 wght=900:120)when the wght default is 400 (#4024). - [cmap] Raise
TTLibErrorfor a truncated or out-of-bounds cmap subtable header (#4151). - [designspaceLib] Reject conflicting duplicate inputs in axis maps instead of silently keeping the last one (#4153).
- [designspaceLib] Read an empty
<lib>element as an empty lib instead of raisingIndexError(#4142, #4144). - [colorLib] Raise a legible error when a COLRv0 layer, or a COLRv1 PaintGlyph or PaintColrGlyph, references a glyph missing from the glyphMap, instead of failing obscurely later (#2629, #4141).
- [cmap] Don't drop subtables in unsupported formats when compiling or dumping a font read from binary (#4136).
- [ttLib] Implement
splitSinglePosso GPOS lookup type 1 offset overflows can be recovered by splitting the subtable (#4091, #4108). - [cmap] Round-trip empty Macintosh format 2 subtables (#3663, #4117).
- [glyf] Raise
TTLibErrorinstead ofRecursionErrorwhenrecalcBounds()hits a composite-component reference cycle (#3899, #4116). - [svgLib] Fix crash parsing an SVG path with consecutive closepath commands (
Z Z) (#4122). - [ttLib] Fix
DefaultTabletype annotations (#4126). - [ttLib] Add support for the
EBSC(Embedded Bitmap Scaling) table (#4113). - [svgLib] Suppress spurious close segments caused by floating-point drift in relative path commands (#3860, #4127).
- [qu2cu] Fix
TypeErrorin the Cython-compiled build whenQu2CuPenpasses tuple splines (#4160). - [mort] Add semantic decompilation, TTX, and compilation support for rearrangement, contextual-substitution, ligature, and insertion subtables (#4158, #4159, #4161).
- [svgLib] Start a new subpath at the just-closed subpath's initial point when a drawto command follows a closepath, per SVG spec (#4154, #4155).
- [misc.filesystem] SECURITY Reject paths that resolve outside the filesystem root: a malicious UFO could read arbitrary files via
..components incontents.plist, and a crafted.ufozcould create files outside its temporary mirror (#4124). - [ttLib] SECURITY Sanitise glyph names used as filenames in EBDT/CBDT
ttx -z extfileexport, preventing arbitrary file writes from untrusted fonts (#4128). - [misc.etree] SECURITY Don't resolve external XML entities in
XMLParserwhen lxml is used, preventing XXE file disclosure on lxml < 5.0 (#4145). - [subset] Fully prune
VARCauxiliary data: collect and remap variation indices referenced by condition tables when subsetting theMultiVarStore, and drop theAxisIndicesList,ConditionList, andMultiVarStorewhen they end up empty (#4162).
4.63.0
- [ttLib] Add support for Apple Color Emoji
bgcltable (#4065). - [ttLib] Add support for
IFTandIFTXtables (Incremental Font Transfer, PatchMapFormat2) (#4070, #4072). - [otData] Introduce
FieldSpecdataclass for OpenType table schema definitions, replacing raw tuples inotData.py(#4076). - [Feat] Show
nametable strings as comments next to label IDs in TTX output, matching the convention used byfvar,STAT,trak(#4089). - [cu2qu] Fix Cython complex-division rounding difference in
split_cubic_into_threethat could cause Β±1 off-curve coordinate shifts (#3928, #4083). - [designspaceLib] Fix
map_backwardfor many-to-one (flat-segment) axis maps that silently dropped entries via dict comprehension (googlefonts/ufo2ft#978, #4085). - [OS/2] Fix
setUnicodeRangesto accept reserved bits 123-127, restoring round-trip withgetUnicodeRangesand fixingrecalcUnicodeRangescrash in the subsetter (#4087, #4088). - [cython] Declare Cython extensions as free-threading compatible on Python 3.13+, so that importing them on free-threaded Python no longer re-enables the GIL (#4073, #4090).
4.62.1
- [feaLib] Extend contextual rule merging to all rule types: single subst, GSUB/GPOS named lookups, ignore rules, and chained alternate subst (#4061).