Kinsoku needs an engine; a naive wrap will break it
Aliases: greedy wrap · line-break · CJK wrapping algorithm
What it is
Kinsoku is not something a designer can “watch for” at the line head. It is a wrap-time constraint: some characters must not be first, some must not be last, and the cut has to be found again under those constraints. Greedy wrap only asks which character still fits on this line. It does not ask whether that cut sends a period to the next head. Without an engine that compiles the prohibition into breaking, the rule does not exist in production.
Why it happens
Greedy wrap accumulates width from the line start and cuts before the character that does not fit. Cheap, which is why mobile lists, canvas text, and custom-drawn controls love it. Kinsoku requires a second decision after the cut: inspect the head and tail classes, and if illegal, back up — carry the previous character down, pull the next one up, or hang. Simple code has no second decision. On the web, the combination of line-break, word-break, and overflow-wrap decides whether that step is reachable; break-anywhere is an explicit off switch. On native, some text controls sit on the system shaper and ship CJK kinsoku by default; custom drawing, some text-kit paths, in-game UI, and canvas fill fall back to greedy cuts. The same sentence is clean in a system field and shows a leading period once drawn onto an image. The copy did not change. The wrap path did.
Where it stops holding
Latin that wraps on spaces rarely produces Chinese-style kinsoku failures; those runs do not need Chinese prohibition. Logs and code editors need a predictable character grid; kinsoku would make break points jump as width changes. A perf-sensitive infinite list that reflows kinsoku every frame has a cost to measure; prefer a system text control over a half-implemented custom wrap. Engine support is not the same as the default being on — some platforms expose a switch, and a product that chose break-anywhere owns the result.
Applying it
- Send Chinese body through system or browser shaping with a strict wrap. Custom-drawn text needs a kinsoku-aware breaker, not a width accumulator.
- Put one punctuated Chinese sentence in a system text control and in a custom label, squeezed to the same width. If heads and tails disagree, the engine is missing, not a style.
- Find whether
word-breakis set to break anywhere. Turning that off does more than another note to “watch punctuation.”
Related
- Same group: F4.14.1 Closing CJK punctuation must not start a line · F4.14.2 Opening brackets and quotes must not end a line · F4.14.4 Mixing fullwidth and halfwidth punctuation throws the beat off
- Nearby: F4.07 Typeface choice · F2.16 Extreme content and overflow
- Search terms:
kinsoku·line-break·greedy wrap