Package-level declarations
Types
The Unicode Bidirectional Algorithm (UAX #9) of Unicode 17 (#320, #323): it resolves an embedding level for each character of a paragraph and reorders a line from logical to visual order, so that mixed Latin, Arabic, Hebrew and numbers display in the right order. It lives in core so that the EPUB layout and PDF text extraction can share it.
Knuth-Liang hyphenation (the TeX algorithm). Given a set of language patterns, finds the valid hyphenation points inside a word so a justified line-breaker can split long words. The pattern data is the language-specific part; the bundled sets (see forLanguage) are the TeX hyph-* pattern files of the hyph-utf8 project, with their exception lists, for every language whose licence lets an Apache-2.0 library carry them (#207).
Turns bytes into text when nobody can be trusted about the encoding.