Recursive AI

Changelog

All onefont Go docs

All notable changes are listed here. The format follows Keep a Changelog, and the project follows Semantic Versioning.

[1.1.1] - 2026-12-03

Fixed

  • Tatweel: a run made only of Common characters that Arabic text uses (the tatweel U+0640, the Arabic comma) is shaped as Arabic when no script is given and none is carried, so a span of tatweels gets its initial, medial and final forms. hb-shape leaves such a run without a script; browsers give it the script of the text around it.
  • Faces without a GPOS table place combining marks. Each mark is placed from the glyph boxes by its combining class (above, below, attached, left, centre and right, double marks, Hebrew points, Arabic and Syriac vowel signs), and marks stacked on one base rise over each other, matching hb-shape. A mark with no class keeps its place but gives up its advance. Faces with a GPOS table, and the Indic, Universal Shaping Engine, Khmer, Myanmar, Thai, Lao, Tibetan, Hangul, N'Ko and Mongolian shapers, are unchanged.
  • In a face without GDEF glyph classes only nonspacing marks lose their advance; spacing and enclosing marks (Mc, Me) keep it, as hb-shape does.
  • The deprecated combining marks U+0340, U+0341, U+0343 and U+0344 are shaped as the plain marks they are equivalent to, even when the face maps them, and a base with marks after it is decomposed and recomposed even when the face maps the base itself (a Greek question mark before a mark, say).

[1.1.0] - 2026-12-03

Added

  • Web fonts: UnwrapWebFont unpacks WOFF 1.0 and WOFF 2.0 files (including WOFF2 collections and the glyf, loca and hmtx transforms) to a plain font for Parse; IsWebFont tells the two apart and WithMaxFontSize bounds the unpacked size (default 64 MiB). The Brotli decoder it needs is our own, in the standard library only, with the RFC 7932 dictionary.
  • Hinting data: Face.GlyphDescription and Instance.GlyphDescription give a glyph's points, contour ends, instructions and composite components, and Face.Hinting the fpgm, prep, cvt, gasp and maxp data a TrueType interpreter needs.
  • Shaping: WithGraphemeClusters makes clusters whole UAX #29 grapheme clusters (conjuncts included, GB9c); WithFeatureRanges, FeatureRange and ParseFeatureRange limit a feature to part of the text (liga[3:5]).
  • Fallback: FallbackChain.WithEmojiPresentation sends emoji sequences (variation selector 16, keycaps, ZWJ sequences, modifiers, flags) to the first colour font that covers them.
  • Dictionary line breaking: Segmenter.AppendLineBreaks allows a break between the words of a run of Thai, Lao, Khmer or Burmese letters, which UAX #14 leaves to a dictionary, as browsers do. The words come from list tables built into the library (generated by tools/dictgen from ICU's dictionary data files; sources and notices in THIRD-PARTY-NOTICES.md, about 1.1 MiB of tables). Text outside the lists stays together up to the next word. Segmenter.NoDictionary restores the rules of UAX #14 alone.

Changed

  • Line breaking for Thai, Lao, Khmer and Burmese now uses the built-in word lists by default, so LineBreaks and Lines return breaks between the words of such a run where 1.0.0 returned none. Segmenter.NoDictionary restores the rules of UAX #14 alone.

Fixed

  • The tatweel (U+0640) takes its joining forms like a dual-joining letter, so a leading, trailing or medial tatweel joins its neighbours.
  • Hebrew points the font has no glyph for no longer add their advance width.
  • A font with no space glyph no longer shows default-ignorable characters (variation selectors, joiners, soft hyphens) as .notdef boxes: they leave no glyph, as in HarfBuzz.
  • A cluster with the text variation selector (U+FE0E) never counts as an emoji sequence, wherever the selector stands.

[1.0.0] - 2026-12-02

First release.

Added

  • Fonts: Parse over the caller's bytes (lazy, bounds-checked tables) for TrueType, OpenType CFF, CFF2 and TrueType Collections (WithFace, NumFaces); cmap lookup including variation selectors; head, hhea, hmtx, OS/2, name and post metrics and names; legacy kern.
  • Outlines: Face.Outline into a PathSink, Face.GlyphPath into a Path, glyph bounds, Affine transforms with Scale, Translate and Mul.
  • Variable fonts: fvar, avar, gvar, HVAR, MVAR and CFF2 variation data through Instance, InstanceAt, InstanceNamed and Normalize; axes and named instances.
  • Shaping: Shape and the reusable Shaper with GSUB lookups 1 to 8 and GPOS lookups 1 to 9, all lookup flags, feature variations, features (ParseFeature), languages, scripts and directions; shapers for Arabic, Syriac, N'Ko, the Indic scripts, Khmer, Myanmar, Tibetan, the Universal Shaping Engine scripts, Thai, Lao and Hangul; Shaper.ShapeRuns for runs cut by the caller; glyph origins (WithOrigins); pair kerning (Kerning).
  • Bidi: Bidi implementing UAX #9 at Unicode 17.0.0 with levels, runs, visual order and mirroring lookup (BidiMirror).
  • Segmentation: Segmenter and iterators for UAX #14 line breaks and UAX #29 grapheme, word and sentence boundaries at Unicode 17.0.0, plus IsEastAsianWide, IsSyllableScript and JoiningTypeOf.
  • Fallback: FallbackChain, FontRuns and ShapeText, which resolves bidi, chooses a font per grapheme cluster and shapes every piece in visual order.
  • Robustness: bounded work, nesting and growth in shaping, charstrings, composite glyphs and variation data; errors that wrap ErrInvalidFont, ErrUnsupportedFormat, ErrFaceIndex, ErrGlyphID, ErrLimit, ErrInvalidArgument and ErrNotFound; fuzz targets for the parsers, the shaper and the Unicode algorithms.
  • Documentation: package documentation, a runnable Example for each feature, and benchmarks against other Go packages in bench/.