­ ("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]"/>

Hyphens

Class

Common
value class Hyphens private constructor(internal val value: Int)

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

Companion Object

Properties

Common
val None = Hyphens(1)

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   |
+---------+
Common
val Auto = Hyphens(2)

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  |
+---------+
Common
val Unspecified = Hyphens(Int.MIN_VALUE)

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