Repository navigation
0.15.0
·
207 commits
to main
since this release
Immutable
release. Only release title and notes can be modified.
This release matches HarfBuzz v15.0.0, and has an MSRV (minimum supported Rust version) of 1.85.
Breaking changes
- Update
read-fontsto 0.46.Fontand the rest of the font model that
HarfRust re-exports come from that release. ShapePlanKey::newborrows the font for the lifetime of the key. A plan
built for a font with lookup variations matches only keys at the same
location.
Added
- Shape fonts with more than 65,535 glyphs, as specified by ISO/IEC
14496-22:2026: GSUB and GPOS 1.2, GDEF 1.4, the 24-bit coverage and class
definition formats, and the extended format of every lookup subtable. - Apply FeatureVariations 1.1 lookup variations.
- Select feature variations at the default location, whose zero coordinates
can satisfy a condition. - Add opt-in
tracingsupport withBuffer::set_message_functioncallbacks
andhr-shape --traceoutput, including intermediate Unicode and glyph
contents. Tracing also works withoutstdand compiles out when disabled. - Extend the C API with subsetting backed by Skera (the
subsetfeature),
glyph drawing and painting backed by Skrifa (drawandpaint), HarfBuzz
C++ ownership helpers, MATH and baseline queries, the set and map APIs,
OpenType tag conversion, glyph collection for sets and lookups, face
metadata and table enumeration, UTF-16 and Latin-1 buffer input, and batched
nominal glyph callbacks.
Changed
- Parse each lookup once per font and keep it, with the font's GSUB, GPOS,
GDEF and AAT tables, alongside the font data. Creating aShaperFontreads
no tables. - Keep parsed
morx,mort,kernandkerxsubtables with the font's
tables, and build each AAT table's cache when it is first applied. AAT
shaping is 5 to 13% faster. - Bound the preprocessing of a font's lookups by work and memory budgets that
scale with the size of its layout tables and are shared by GSUB, GPOS and
GDEF. Long contextual coverage arrays are read on demand. - Reduce code size by replacing the standard library sorts with small heap
and insertion sorts, sharing AAT class-set collection, and returningOption
from buffer lookups instead of panicking.
Fixed
- Reject GSUB/GPOS lookups with an out-of-range
lookupTypeinstead of
truncating it tou8. A malformed font could have e.g. type 3586 dispatched
as MultipleSubst, expanding a single character into thousands of glyphs and
costing up to a second pershapecall. HarfBuzz rejects such tables. - When a variation selector is replaced by the not-found variation selector glyph, reset that selector's Unicode properties instead of the first glyph's, matching HarfBuzz.
- Document that glyph IDs are not limited to
u16: glyphs supplied by the caller, such as the not-found variation selector glyph, are passed through unchanged. Shaping tests now cover values aboveu16::MAX. - Clamp built-in advances that variations take below zero, as HarfBuzz does.
Custom font callbacks keep signed results. - At the character cluster level, scan the whole range for its minimum cluster
when setting unsafe flags. - Process singleton clusters when producing safe-to-insert-tatweel flags.
- Merge monotone clusters before moving a Hangul tone mark ahead of its
syllable. - Round synthesized vertical origins down when a glyph is taller than the line
by an odd number of units. - Reorder Telugu length marks before virama and include USE symbol clusters
in syllable reordering, matching HarfBuzz. - Reject U+11A7 as a trailing Jamo when composing Hangul.
- Keep every above-base mark when moving a Thai Nikhahit.
- Skip single positioning format 2 for a coverage index past the value
records, instead of reading past them.