Skip to content

Releases

v0.27.0

Choose a tag to compare

@tannevaled tannevaled released this 28 Nov 15:16
e2bbc38

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

Choose a tag to compare

@tannevaled tannevaled released this 27 Nov 21:08
40f1679

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

Choose a tag to compare

@tannevaled tannevaled released this 21 Nov 17:31
e7edbd3

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), and Face.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 with errors.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

Choose a tag to compare

@tannevaled tannevaled released this 21 Nov 07:36
8b46891

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

Choose a tag to compare

@tannevaled tannevaled released this 21 Nov 06:32
9ba2993

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

Choose a tag to compare

@tannevaled tannevaled released this 16 Nov 21:40
4381c99

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

Choose a tag to compare

@tannevaled tannevaled released this 09 Nov 13:30
ea53536

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

Choose a tag to compare

@tannevaled tannevaled released this 09 Nov 12:49
8ff94f3

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

Choose a tag to compare

@tannevaled tannevaled released this 08 Nov 08:42
c9f7fbd

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

Choose a tag to compare

@tannevaled tannevaled released this 08 Nov 08:37
6bbc40d

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