Skip to main content
Logo Appt Light

Bold text on Android

Apps should use bold text when users have indicated this as a preference in the system settings. Turning on bold text improves the contrast of the letters against the background, making the text easier to read. This is vital if you are visually impaired, but it can also be useful if you need reading glasses.

Android 12 has added the fontWeightAdjustment property. The property returns an integer between 1 and 1000, which indicates the current user preference for increasing font weight. The constant FontStyle.FONT_WEIGHT_BOLD has a value of 700.

fun Context.prefersBoldFont(): Boolean {
    if (Build.VERSION.SDK_INT < Build.VERSION_CODES.S) {
        return false
    }
    return resources.configuration.fontWeightAdjustment >= FontStyle.FONT_WEIGHT_BOLD
}

Feedback?

Let us know!