# LayoutElementBuilders.FontSetting

Artifact: [androidx.wear.protolayout:protolayout](https://developer.android.com/jetpack/androidx/releases/wear-protolayout) [View Source](https://cs.android.com/search?q=file:androidx/wear/protolayout/LayoutElementBuilders.java+class:androidx.wear.protolayout.LayoutElementBuilders.FontSetting) Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.2.0)

*** ** * ** ***

<br />

```
@RequiresSchemaVersion(major = 1, minor = 400)
interface LayoutElementBuilders.FontSetting
```

<br />

*** ** * ** ***

Interface defining a single point of customization in a font.

## Summary

| ### Public functions |
|---|---|
| `java-static https://developer.android.com/reference/kotlin/androidx/wear/protolayout/LayoutElementBuilders.FontSetting` | `@https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/RequiresSchemaVersion(major = 1, minor = 400) https://developer.android.com/reference/kotlin/androidx/wear/protolayout/LayoutElementBuilders.FontSetting#roundness(int)(value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/LayoutElementBuilders.FontSetting` option for custom roundness for font. |
| `java-static https://developer.android.com/reference/kotlin/androidx/wear/protolayout/LayoutElementBuilders.FontSetting` | `@https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/RequiresSchemaVersion(major = 1, minor = 400) https://developer.android.com/reference/kotlin/androidx/wear/protolayout/LayoutElementBuilders.FontSetting#tabularNum()()` `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/LayoutElementBuilders.FontSetting` option for enabling displaying tabular numerals. |
| `java-static https://developer.android.com/reference/kotlin/androidx/wear/protolayout/LayoutElementBuilders.FontSetting` | `@https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/RequiresSchemaVersion(major = 1, minor = 400) https://developer.android.com/reference/kotlin/androidx/wear/protolayout/LayoutElementBuilders.FontSetting#weight(int)(value: @https://developer.android.com/reference/kotlin/androidx/annotation/IntRange(from = 1, to = 1000) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/LayoutElementBuilders.FontSetting` option for custom weight for font. |
| `java-static https://developer.android.com/reference/kotlin/androidx/wear/protolayout/LayoutElementBuilders.FontSetting` | `@https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/RequiresSchemaVersion(major = 1, minor = 400) https://developer.android.com/reference/kotlin/androidx/wear/protolayout/LayoutElementBuilders.FontSetting#width(float)(value: @https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange(from = 25, to = 200) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/LayoutElementBuilders.FontSetting` option for custom width for font. |

## Public functions

### roundness

Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.3.0)

```
@RequiresSchemaVersion(major = 1, minor = 400)
java-static fun roundness(value: Int): LayoutElementBuilders.FontSetting
```

`https://developer.android.com/reference/kotlin/androidx/wear/protolayout/LayoutElementBuilders.FontSetting` option for custom roundness for font. For more information, see [here](https://fonts.google.com/knowledge/glossary/rond_axis).

| Parameters |
|---|---|
| `value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | roundness, usually in 0..100, but actual range and availability can depend on the font used |

### tabularNum

Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.2.0)

```
@RequiresSchemaVersion(major = 1, minor = 400)
java-static fun tabularNum(): LayoutElementBuilders.FontSetting
```

`https://developer.android.com/reference/kotlin/androidx/wear/protolayout/LayoutElementBuilders.FontSetting` option for enabling displaying tabular numerals. In other words, all numeral characters will have the same width. This corresponds to `tnum` OpenType feature.

This setting's availability is font dependent and may not have effect on all font families, some of them like Roboto automatically space out numeral characters to have the same width, while other characters will have their own width.

### weight

Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.2.0)

```
@RequiresSchemaVersion(major = 1, minor = 400)
java-static fun weight(value: @IntRange(from = 1, to = 1000) Int): LayoutElementBuilders.FontSetting
```

`https://developer.android.com/reference/kotlin/androidx/wear/protolayout/LayoutElementBuilders.FontSetting` option for custom weight for font. Similar to the `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/LayoutElementBuilders.FontWeightProp` but it accepts any value. For more information, see [here](https://fonts.google.com/knowledge/glossary/weight_axis).

Note that using this `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/LayoutElementBuilders.FontSetting` will override `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/LayoutElementBuilders.FontStyle.Builder#setWeight(androidx.wear.protolayout.LayoutElementBuilders.FontWeightProp)`.

| Parameters |
|---|---|
| `value: @https://developer.android.com/reference/kotlin/androidx/annotation/IntRange(from = 1, to = 1000) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | weight, usually in 1..1000, but actual range can be smaller, depending on the font used |

### width

Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.2.0)

```
@RequiresSchemaVersion(major = 1, minor = 400)
java-static fun width(value: @FloatRange(from = 25, to = 200) Float): LayoutElementBuilders.FontSetting
```

`https://developer.android.com/reference/kotlin/androidx/wear/protolayout/LayoutElementBuilders.FontSetting` option for custom width for font. For more information, see [here](https://fonts.google.com/knowledge/glossary/width_axis).

| Parameters |
|---|---|
| `value: @https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange(from = 25, to = 200) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | width, usually in 25..200, but actual range can depend on the font used |