calculateLetterSpacing

fun calculateLetterSpacing(rebasedFontSize: TextUnit, baseFontSize: TextUnit, fontWeight: FontWeight, fontFamily: FontFamily, extraLetterSpacing: Boolean): TextUnit(source)

Shared letter spacing calculation used by createTextStyle.

Return

The calculated letter spacing as a TextUnit in sp units.

Parameters

rebasedFontSize

The already-rebased font size.

baseFontSize

The base font size used for scaling.

fontWeight

The font weight, used to derive the letter spacing density.

fontFamily

The font family, used to determine if extra spacing applies.

extraLetterSpacing

Whether to apply extra letter spacing for supported font families.