androidx.compose.ui.text.font
FontWeight
Class · from org.jetbrains.compose.ui:ui-text:1.12.2
No hand-written docs yet.
The thickness of the glyphs, in a range of [1, 1000].
class FontWeight(
weight: Int,
) : Comparable<FontWeight>
Is a
Comparable
How to get one
Create it
FontWeight(weight)constructor
Ready-made values and functions that return it
Used by
Parameters that take a FontWeight.
Text(fontWeight)TextStyle.copy(fontWeight)TextStyle.merge(fontWeight)
Properties
W100
val W100: FontWeight
Thin
W200
val W200: FontWeight
ExtraLight
W300
val W300: FontWeight
Light
W400
val W400: FontWeight
Normal / regular / plain
W500
val W500: FontWeight
Medium
W600
val W600: FontWeight
SemiBold
W700
val W700: FontWeight
Bold
W800
val W800: FontWeight
ExtraBold
W900
val W900: FontWeight
Black
Thin
val Thin: FontWeight
Alias for W100
ExtraLight
val ExtraLight: FontWeight
Alias for W200
Light
val Light: FontWeight
Alias for W300
Normal
val Normal: FontWeight
The default font weight - alias for W400
Medium
val Medium: FontWeight
Alias for W500
SemiBold
val SemiBold: FontWeight
Alias for W600
Bold
val Bold: FontWeight
A commonly used font weight that is heavier than normal - alias for W700
ExtraBold
val ExtraBold: FontWeight
Alias for W800
Black
val Black: FontWeight
Alias for W900
weight
val weight: Int
Library docs
The thickness of the glyphs, in a range of [1, 1000].