LayoutElementBuilders.FontSetting


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


Interface defining a single point of customization in a font.

Summary

Public functions

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

FontSetting option for enabling displaying tabular figures.

java-static LayoutElementBuilders.FontSetting
@RequiresSchemaVersion(major = 1, minor = 400)
weight(value: Float)

FontSetting option for custom weight for font.

java-static LayoutElementBuilders.FontSetting
@RequiresSchemaVersion(major = 1, minor = 400)
width(value: Float)

FontSetting option for custom width for font.

Public functions

tabularNum

Added in 1.2.0-alpha04
@RequiresSchemaVersion(major = 1, minor = 400)
java-static fun tabularNum(): LayoutElementBuilders.FontSetting

FontSetting option for enabling displaying tabular figures. 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-alpha04
@RequiresSchemaVersion(major = 1, minor = 400)
java-static fun weight(value: Float): LayoutElementBuilders.FontSetting

FontSetting option for custom weight for font. Similar to the FontWeightProp but it accepts any value. For more information, see here.

Note that using this FontSetting will override setWeight.

Parameters
value: Float

weight, usually in 1..1000, but actual range can depend on the font used

width

Added in 1.2.0-alpha04
@RequiresSchemaVersion(major = 1, minor = 400)
java-static fun width(value: Float): LayoutElementBuilders.FontSetting

FontSetting option for custom width for font. For more information, see here.

Parameters
value: Float

width, usually in 25..200, but actual range can depend on the font used