- A knockout, clip or blend-mode merge being tried may use the whole
import allowance beyond what was read before it. A merge that is made
must still fit the allowance with everything read before it.
- A knockout that turns out to cut nothing moves what its drawing read
out of the allowance, as a merge that isn't made does. A hidden one
also forgets what its drawing counted, so a later merge that leaves it
out reports only the hidden layer.
- A hidden layer in a mode VectorCraft lacks is left out before any
knockout drawing, as before the knockout merge.
- A knockout at 0 fill whose painted pixels lie outside the bounds of
every layer below it is kept apart before their canvas is made.
- A knockout at 0 fill whose pixels cover none of the painted pixels below
it is no longer merged with them.
- A hidden knockout is left out only when its merge would be made or is
too large, so one whose layer mask hides all of it comes in with
hiddenLayers. What drawing it counted is forgotten when it is left out.
- The pixels and canvases of a merge that isn't made are counted against
a separate limit of the same size, so the layers can still be read
apart afterward.
- docs: the memory-limit fallback for knockouts is listed with the
knockouts that aren't applied.
A font can place a glyph by the glyph after it, so the glyphs before a
mismatch are laid out again as a line of their own before they replace
their outlines. The glyph budget covers that second check.
Readings of a shape are capped by those tried, not those kept, so a shape
whose every reading fails stops at the cap. The layout check grows a
window from each line start, doubling while the type draws the outlines,
and starts the next line at a mismatch, so a line split at every glyph
costs about twice its glyphs, not half their square; a glyph budget
leaves anything past it as outlines. A tracked line of 450 glyphs: 259 ms.
The lone-glyph rule looks at lines as the outlines lie, before the layout
check splits them, so tracked one-contour letters (L, I, T, H, E) become
type. A shape keeps every glyph and pose it fits exactly, upright first
(an L, and a turned L half round; an I upright or upside down), and the
line around it chooses; a one-glyph line may turn to another candidate
to take the next glyph.
The whole-outline check flattens the shape once per shape, samples every
corner and points twice the tolerance apart, and asks a flat uniform grid
of segments. With Microsoft YaHei loaded: 300 CJK outlines in 350 ms
(1.9 s before), one line in 25 ms. FontDb::outline reuses
outline_uncached, and the compositing test covers knockout_shape.