public class Mode internal constructor(internal val value: Int)
Controls whether to enforce the specified line height.
Font metrics determine the default line height. When the specified line height is too tight for the font, use Mode.Minimum to fall back to system-provided heights. This prevents clipping in languages with tall glyphs (e.g., Arabic, Burmese).
Members
Companion
public companion object
Properties
Fixed
public val Fixed: Mode
Always use the specified line height on every line but add the necessary paddings on text layout's top and bottom when the system preferred line height is larger. This guarantees that taller glyphs won't be trimmed at the boundaries. On the other hand, middle lines respect the specified line height at all times and tall glyphs can overflow to upper or lower lines.
Minimum
public val Minimum: Mode
By specifying Mode.Minimum, when the specified line height is smaller than the system preferred value, the system preferred one is used instead on all lines. Top and bottom paddings are also added. This prevents the overflow of tall glyphs in middle lines.
Tight
public val Tight: Mode
Be able to use the specified line height at all lines, including the first and last. This configuration basically gets rid of the safety rails that are added by Mode.Fixed. Tall glyphs might get trimmed at top, bottom, or both when used in conjunction with the corresponding Trim value.