Skip to main content

Module hyphenation

Module hyphenation 

Source
Expand description

Hyphenation support: soft-hyphen detection and automatic hyphenation.

Provides two complementary break-opportunity sources:

  • soft_hyphen_breaks scans the input text for U+00AD SOFT HYPHEN and returns the byte offset after each soft-hyphen character (i.e. the start of the next character). This offset is where the line may be broken, which is the same convention used by unicode-linebreak and the layout engine’s internal break-opportunity list.

  • [automatic_hyphen_breaks] (behind the hyphenation feature) uses TeX hyphenation patterns via the [hypher] crate to find additional break opportunities within words for the given language.

Functions§

soft_hyphen_breaks
Scan text for U+00AD SOFT HYPHEN characters and return the byte offset after each one.