Languages and hyphenation
ℹ️
The language settings of the backend are about hyphenation: patterns and language nodes. Right to left and mixed direction text is supported: the frontend reorders it with the Unicode Bidi algorithm (
SettingDirection sets the paragraph direction, otherwise it is detected from the text), and the line breaker’s TextDirection is the paragraph’s base direction (see Linebreaking).Languages are an important part of the boxes and glue library. Since the PDF backend uses the Harfbuzz library, you get the best font and language support.
Language nodes
func (d *PDFDocument) LoadPatternFile(filename string, langname string) (*lang.Lang, error)func (d *PDFDocument) SetDefaultLanguage(l *lang.Lang)