Repository navigation
Releases
v0.27.0
What's Changed
- Face.ShapeAlternate: choose the alternate a GSUB type 3 lookup picks by @tannevaled in #84
Full Changelog: v0.26.0...v0.27.0
v0.26.0
What's Changed
- Face.MathVariantsUnits: variants and assembly without rounding by @tannevaled in #83
Full Changelog: v0.25.0...v0.26.0
v0.25.0
The work of outlining a glyph is now observable, so a caller can bound a whole font deterministically (#81).
Face.GlyphCost(gid) (cost int, err error), andFace.GlyphOutlineCost/Face.GlyphSVGPathCost, which return the outline and its cost from one interpretation.- Units: charstring operators executed for CFF, CFF2 and Type 1 (subroutines and seac components included); points the glyph expands to for glyf. Units are not comparable across kinds.
ErrOutlineBudget: every per-glyph budget refusal now matches it witherrors.Is; messages are unchanged.- Scale, measured: STIX Two Math's busiest glyph costs 1,267 operators and all 6,760 glyphs 166,885.
Nothing is stored on Font or Face; outlines are byte-identical to the previous main on 317,864 glyphs of 227 fonts.
v0.24.0
What's Changed
- Face.GlyphControlBox: a glyph's control box, as FreeType computes it by @tannevaled in #80
Full Changelog: v0.23.0...v0.24.0
v0.23.0
A font may now be untrusted input: nothing it declares is allocated before it is checked (#75).
Parse (#78)
- Every count that sizes an allocation (cmap 2/4/6/8/10/12/13/14, CFF2 INDEX, GSUB/GPOS lookups and subtables, layout lists, MATH kern/variants/assembly, gvar, HVAR/VVAR/MVAR, fvar) is checked against the bytes present, by division, so it cannot overflow on 32-bit builds.
- A sub-table that many offsets point at is decoded once.
- Coverage and ClassDef tables are binary-searched in the font's bytes, as HarfBuzz does, instead of being expanded glyph by glyph. Answers are identical, including for unsorted or overlapping tables ("later record wins").
- A per-Parse budget of 1 MiB plus 64 bytes per input byte backs these up.
- A GPOS PairPos format 2 subtable whose two value formats are both 0 parses with no class grid instead of being refused.
Per glyph (#77)
- A composite TrueType glyph may expand to at most 65,535 points, counted before anything is built.
- A CFF, CFF2 or Type 1 charstring may execute at most 131,072 operators, subroutines included, and emit at most 65,536 points; seac components share one budget.
- A simple glyph whose endPtsOfContours decreases is refused instead of panicking (found by the new FuzzGlyphContours).
Behaviour change
Fonts past any of these bounds are now refused with an error. Measured on several hundred real fonts, the largest stay 8.8 to 103 times below them, and outlines, shaping, kerning and MATH answers are unchanged on every font measured.
Also: testdata/** -text, so Windows checkouts no longer rewrite committed fuzz seeds.
v0.22.0
What's Changed
- fix(deps): update module github.com/andybalholm/brotli to v1.3.0 by @tannevaled in #69
- A pair query can say it cannot speak for this font's kerning, instead of answering zero by @tannevaled in #76
Full Changelog: v0.21.1...v0.22.0
v0.21.1
What's Changed
- perf(face): decode and flatten each glyph outline once, bound the caches by @tannevaled in #68
Full Changelog: v0.21.0...v0.21.1
v0.21.0
What's Changed
- feat(face): GlyphMaskIndexAt, a glyph mask at a fractional pen position by @tannevaled in #67
Full Changelog: v0.20.0...v0.21.0
v0.20.0
What's Changed
- a shaped run gets an unrounded form, or no typesetter can use the shared one by @tannevaled in #65
Full Changelog: v0.19.0...v0.20.0
v0.19.0
What's Changed
- every scaled metric gets an unrounded form, because a MATH value is fractional by @tannevaled in #64
Full Changelog: v0.18.0...v0.19.0