Hyphenator
class Hyphenator(val patternSet: HyphenationPatternSet, val leftMin: Int = patternSet.leftMin, val rightMin: Int = patternSet.rightMin)(source)
A hyphenator based on Frank Liang's pattern algorithm as used by TeX, with the patterns of hyph-utf8.
Use Hyphenator.forLanguage to find a hyphenator for a language, or the top level hyphenate function.
Parameters
patternSet
the patterns to use
leftMin
the minimum number of characters before a hyphenation point
rightMin
the minimum number of characters after a hyphenation point
Constructors
Link copied to clipboard
constructor(patternSet: HyphenationPatternSet, leftMin: Int = patternSet.leftMin, rightMin: Int = patternSet.rightMin)
Functions
Link copied to clipboard
Link copied to clipboard
Returns the hyphenation points of word: the UTF-16 indices of the characters a hyphen may be inserted before.
Link copied to clipboard
Returns the hyphenation points of all words in text: the UTF-16 indices of the characters a hyphen may be inserted before. Words are maximal sequences of letters and marks, words that already contain a soft hyphen have no hyphenation points.