HyphenationPatterns
Automatic hyphenation using Frank Liang's pattern-matching algorithm — the same approach TeX uses.
A pattern is a fragment such as hy3ph or .in2 whose embedded digits score the inter-letter positions of any word the fragment occurs in. The word is sandwiched between two boundary markers (.), every pattern that occurs as a substring contributes its digits to the overlapping positions, and the highest digit wins each position. Odd final scores mark legal break points; even (and zero) scores forbid a break. A leading/trailing run is additionally protected by leftMin/rightMin so words never break after one letter or before two.
Patterns are stored packed into one space-separated string and parsed lazily into a trie the first time hyphenate runs, so a document that never opts in pays nothing.
Opt in per paragraph via com.conamobile.pdfkmp.style.TextStyle.hyphenation; see Hyphenators for the bundled language sets.