Measuring the same word over and over is the shape of line breaking: a
Knuth-Plass pass reconsiders every word against several candidate lines, and
hyphenation re-measures every fragment of every word. The font layer
deliberately has no cache, so this is ours.
The cache changes speed and nothing else — the key is the whole input — so it
cannot make the output depend on the order calls arrive in.
Measuring the same word over and over is the shape of line breaking: a Knuth-Plass pass reconsiders every word against several candidate lines, and hyphenation re-measures every fragment of every word. The font layer deliberately has no cache, so this is ours.
The cache changes speed and nothing else — the key is the whole input — so it cannot make the output depend on the order calls arrive in.