Hyphens


Automatic hyphenation configuration.

Hyphenation is a dash-like punctuation mark used to join two-words into one or separate syl-lab-les of a word.

Automatic hyphenation is added between syllables at appropriate hyphenation points, following language rules.

However, user can override automatic break point selection, suggesting line break opportunities (see Suggesting line break opportunities below).

Suggesting line break opportunities:

  • \u2010 ("hard" hyphen) Indicates a visible line break opportunity. Even if the line is not actually broken at that point, the hyphen is still rendered.

  • \u00AD ("soft" hyphen) This character is not rendered visibly; instead, it marks a place where the word can be broken if hyphenation is necessary.

The default configuration for Hyphens = Hyphens.None

Summary

Public companion properties

Hyphens

The words will be automatically broken at appropriate hyphenation points.

Cmn
Hyphens

Lines will break with no hyphenation.

Cmn
Hyphens

This represents an unset value, a usual replacement for "null" when a primitive value is desired.

Cmn

Public functions

open String
Cmn

Public companion properties

Auto

val AutoHyphens

The words will be automatically broken at appropriate hyphenation points.

However, suggested line break opportunities (see Suggesting line break opportunities above) will override automatic break point selection when present.

+---------+
| Experi- |
| mental  |
+---------+

None

val NoneHyphens

Lines will break with no hyphenation.

"Hard" hyphens will still be respected. However, no automatic hyphenation will be attempted. If a word must be broken due to being longer than a line, it will break at any character and will not attempt to break at a syllable boundary.

+---------+
| Experim |
| ental   |
+---------+

Unspecified

val UnspecifiedHyphens

This represents an unset value, a usual replacement for "null" when a primitive value is desired.

Public functions

toString

open fun toString(): String