# WearPreviewFontScales

# WearPreviewFontScales

Artifact:[androidx.wear.compose:compose-ui-tooling](https://developer.android.com/jetpack/androidx/releases/wear-compose)  
[View Source](https://cs.android.com/search?q=file:androidx/wear/compose/ui/tooling/preview/WearPreviewFontScales.kt+class:androidx.wear.compose.ui.tooling.preview.WearPreviewFontScales)  
Added in[1.2.0](https://developer.android.com/jetpack/androidx/releases/wear-compose#1.2.0)

<br />

```
@Preview(device = "id:wearos_small_round", showSystemUi = true, backgroundColor = 4278190080, showBackground = true, group = "Fonts - Small", fontScale = 0.94)
@Preview(device = "id:wearos_small_round", showSystemUi = true, backgroundColor = 4278190080, showBackground = true, group = "Fonts - Normal", fontScale = 1.0)
@Preview(device = "id:wearos_small_round", showSystemUi = true, backgroundColor = 4278190080, showBackground = true, group = "Fonts - Medium", fontScale = 1.06)
@Preview(device = "id:wearos_small_round", showSystemUi = true, backgroundColor = 4278190080, showBackground = true, group = "Fonts - Large", fontScale = 1.12)
@Preview(device = "id:wearos_small_round", showSystemUi = true, backgroundColor = 4278190080, showBackground = true, group = "Fonts - Larger", fontScale = 1.18)
@Preview(device = "id:wearos_small_round", showSystemUi = true, backgroundColor = 4278190080, showBackground = true, group = "Fonts - Largest", fontScale = 1.24)
annotation WearPreviewFontScales
```

<br />

*** ** * ** ***

[WearPreviewFontScales](https://developer.android.com/reference/kotlin/androidx/wear/compose/ui/tooling/preview/WearPreviewFontScales)is a multi-preview annotation for the Wear devices of following font scales

- Fonts - Small: 0.94f
- Fonts - Normal: 1f
- Fonts - Medium: 1.06f
- Fonts - Large: 1.12f
- Fonts - Larger: 1.18f
- Fonts - Largest: 1.24f

Font scales represent the scaling factor for fonts, relative to the base density scaling. Please note, the above list is not exhaustive. It previews the composables on a small round Wear device.  

```kotlin
import androidx.compose.ui.res.painterResource
import androidx.wear.compose.material.CardDefaults
import androidx.wear.compose.material.MaterialTheme
import androidx.wear.compose.material.Text
import androidx.wear.compose.material.TitleCard

TitleCard(
    onClick = { /* Do something */ },
    title = { Text("TitleCard With an ImageBackground") },
    backgroundPainter =
        CardDefaults.imageWithScrimBackgroundPainter(
            backgroundImagePainter = painterResource(id = R.drawable.backgroundimage)
        ),
    contentColor = MaterialTheme.colors.onSurface,
    titleColor = MaterialTheme.colors.onSurface,
) {
    Text("Text coloured to stand out on the image")
}
```

## Summary

|                                                                      ### Public constructors                                                                       |
|--------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [WearPreviewFontScales](https://developer.android.com/reference/kotlin/androidx/wear/compose/ui/tooling/preview/WearPreviewFontScales#WearPreviewFontScales())`()` |

## Public constructors

### WearPreviewFontScales

```
WearPreviewFontScales()
```