Skip to content

every accented word broke at an offset, and the suite was green throughout - #774

Merged
tannevaled merged 1 commit into
mainfrom
hyphenation-v1.0.1
Nov 13, 2026
Merged

tannevaled merged 1 commit into
mainfrom
hyphenation-v1.0.1

Conversation

@tannevaled

Copy link
Copy Markdown
Contributor

every accented word broke at an offset, and the suite was green throughout

go-typeset/hyphenation v1.0.1 fixes an indexing mismatch: the value
array was built over the augmented word by byte index and read back by
rune index. Those agree for exactly as long as every letter is one byte —
every English word and no French, German, Czech, Polish or Vietnamese one.

⛔ So every test here went on passing while a whole class of input was set
wrong. Nothing in this engine's suite used a multi-byte letter in a word long
enough to hyphenate.

Measured

tectonic 0.17.0, one paragraph at \hsize=72pt, the same English patterns
on both sides (no babel, no language option):

reference Une présenta-/tion … représentations élé-/mentaires …
v1.0.0 Une présent-/ation … des représentat-/ions éléme-/ntaires …
v1.0.1 Une présenta-/tion … représentations élémentaires …

éléme-ntaires is the shape of the defect: a break between the m and the n of
a syllable, where no pattern in hyphen.tex can put one, displaced by exactly
as many positions as the word has multi-byte letters before it.

présenta-tion is the one word both engines break in the same place, and
v1.0.1 matches the reference there.

The gate, and its mutation

accenthyphen_test.go asserts the reference's break and the absence of the
four offset breaks. Its mutation is the dependency itself — pinning go.mod
back to v1.0.0 reddens it, which is how the two outputs above were produced,
from two builds of this engine differing only in that line:

accenthyphen_test.go:48: `présentation` is not broken where the reference
  breaks it (`présenta-` / `tion`)
accenthyphen_test.go:57: the byte/rune offset is back: "éléme-" is in the page
accenthyphen_test.go:57: the byte/rune offset is back: "présent-ation" is in the page
accenthyphen_test.go:57: the byte/rune offset is back: "représentat-" is in the page
accenthyphen_test.go:57: the byte/rune offset is back: "considérat-" is in the page

⚠ What this does not claim

The corpus is English-language physics, so the papers that score here barely
exercise this; no claim is made that it moves the fidelity number, and I
have not run the A/B because there is no reason to expect movement and the
witness is direct.

It is a defect fixed on its own witness, in a class the metric does not reach —
the same shape as the kerning defect that was invisible to every number we
steer by.

Refs go-typeset/hyphenation#8, #716 — the first merged and
released as v1.0.1, the second the open issue about what the fidelity metric
cannot see, which this is another instance of.

🤖 Generated with Claude Code

…ghout

go-typeset/hyphenation v1.0.1 (its #8) fixes an indexing mismatch: the value
array was built over the augmented word by BYTE index and read back by RUNE
index. The two agree for exactly as long as every letter is one byte — every
English word and no French, German, Czech, Polish or Vietnamese one.

⛔ SO EVERY TEST HERE WENT ON PASSING while a whole class of input was set
wrong. Nothing in this engine's suite used a multi-byte letter in a word long
enough to hyphenate.

MEASURED against tectonic 0.17.0, one paragraph at \hsize=72pt, the SAME
English patterns on both sides (no babel, no language option):

	reference   Une présenta-/tion … représentations élé-/mentaires …
	v1.0.0      Une présent-/ation … des représentat-/ions éléme-/ntaires …
	v1.0.1      Une présenta-/tion … représentations élémentaires …

`éléme-ntaires` is the shape of the defect: a break between the m and the n of
a syllable, where no pattern in hyphen.tex can put one, and displaced by
exactly as many positions as the word has multi-byte letters before it.
`présenta-tion` is the one word both engines break in the same place, and
v1.0.1 matches the reference there.

THE GATE, AND ITS MUTATION

accenthyphen_test.go asserts the reference's break and the ABSENCE of the four
offset breaks. Its mutation is the dependency itself — pinning go.mod back to
v1.0.0 reddens it, which is how the two outputs above were produced, from two
builds of this engine differing only in that line:

	accenthyphen_test.go:48: `présentation` is not broken where the reference
	  breaks it (`présenta-` / `tion`)
	accenthyphen_test.go:57: the byte/rune offset is back: "éléme-" is in the page

⚠ WHAT THIS DOES NOT CLAIM. The corpus is English-language physics, so the
papers that score here barely exercise it; this is not expected to move the
fidelity number and no claim is made that it does. It is a defect fixed on its
own witness, in a class the metric does not reach — the same shape as #716.

Refs go-typeset/hyphenation#8.

Co-Authored-By: Claude Opus 5 <[email protected]>
@tannevaled
tannevaled merged commit b4b9d49 into main Nov 13, 2026
18 checks passed
@tannevaled
tannevaled deleted the hyphenation-v1.0.1 branch November 13, 2026 14:55
tannevaled added a commit that referenced this pull request Nov 13, 2026
…776)

Found by the bibliography pass on #754: the audit read opentype v0.20.0 and
the library is at v0.21.1. v0.21.0 adds GlyphMaskIndexAt (a glyph mask at a
fractional pen position); v0.21.1 decodes and flattens each glyph outline once
and bounds the caches. Neither touches shaping, so neither bears on that
audit's finding F.

⛔ A PERF CHANGE THAT TOUCHES GLYPH OUTLINES HAS TO BE SHOWN NOT TO MOVE THE
METRICS, so it was:

 - the five box widths measured against tectonic in the same pass are
   unchanged: Waffle 27.22002, AV 13.89001, office 22.21, To 11.39001,
   Affliction 40.28
 - a rendered page is BYTE-IDENTICAL between the two versions (the accented
   paragraph of #774, cmp exits 0, and gotex-worddiff reports 0 words either
   way)

⚠ No benchmark: the 1-minute load average is 11, where times are not exact.
The claim here is that output does not move, which is a comparison of bytes
and holds under any load — not that the perf gain was measured.

Refs #754.

Co-authored-by: Claude Opus 5 <[email protected]>
tannevaled added a commit that referenced this pull request Nov 13, 2026
CLAUDE.md asks every user-visible change to reach the README, and two of
today's did not: the accented-word fix (#774) and the \hyphenation exception
list (#775). The roadmap's line-breaking item now carries them in the shape
section 4 already uses — the capability, then the defect with the measurement
that settled it.

⚠ It also says the thing the README was silent about and a reader most needs:
only English patterns are embedded, so a paper in another language is set
unhyphenated where a real TeX hyphenates it. That is #754's finding E, open.

Refs #754, #774, #775.

Co-authored-by: Claude Opus 5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant