mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-19 04:24:51 +00:00
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.