Repository navigation
forme 0.11.0
A font finding now says, as data, which face would clear it, so a caller
can supply one and lay the document out again. A segment break, an aligned
line and a shrink-wrapped float are set as their text is, across element
boundaries. Shaping is faster on CFF, COLR and morx faces. From PRs #941
to #960.
Go: go.mod names Go 1.27, up from 1.26, and builds with go1.27.3. A module
importing forme needs Go 1.27.
Font findings as data (layout, #959, #960):
- Finding.Font is a *FontNeed on every finding a different face would
clear. It holds Families (the names to supply, exactly as FontSet.Face
is called with them), Request (weight, width and style), Text (the
characters to cover), Features (OpenType tags, or "MATH") and Used (the
face set instead). Composed.FontNeeds merges them into a retry list:
supply a face for each need and Compose again. - It is carried by no-face, font-fallback, font-substituted, glyph-missing
for text and emphasis marks, caps-synthesised, the font-variant findings
where a face lacks the feature, math-fallback, an unreadable MATH table,
and an @font-face rule that loaded no font. - no-face names the families the box asked for and points at its element,
once per face to supply, instead of quoting "serif" once per document. - Two findings that need different faces stay two: two family lists that
share their first forty characters were merged into one. A bold and a
regular box asking for the same missing family are two findings, and
the message says "(weight 700)".
Text layout (layout, paragraph, #944, #946 to #949):
- A segment break at the end of an element is decided by the character
after it: "漢\n字" sets no space between the ideographs. - An image or inline-block beside a break is the character beside it, in
both directions, and a collapsed space is not carried across one. - A run of formatting characters such as U+061C takes no letter-spacing
of its own at the end of a line. A float around "ع" was
2px narrower than its text. - An aligned or right-to-left line hangs the letter-spacing of the letter
drawn furthest right. Lines ending in Arabic, a formatting mark or a
right-to-left run were set up to 8px off their edge.
Shaping (shape, #950 to #954):
- A trak table whose interpolation is not a number, and a NaN point size,
track as HarfBuzz does, on every architecture. - A format 3 context rule that cannot start at a glyph is refused before
it is matched: 27% to 35% faster shaping on Source Sans 3 and Source
Serif 4, identical output over 3,884 fonts. - Whether a glyph can start a morx subtable is remembered per face, within
a bound: 5% to 12% faster on fonts with a morx table. - A COLR, CFF, CFF2 or VARC face's cached ink is read without its lock:
ink measurement on eight goroutines is up to 95% faster.
- The subset fuzz oracle reads a renumbered subset at each glyph's new
index. The two crashers it caught on 2026-10-18 and 2026-10-25 are kept
as seeds.
Verified on main at 3714ec6: CI green in all three jobs, the reftest
ratchet at 5996 of 6253, and the API changes since v0.10.0 additions only.