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)
weight(value: @FloatRange(from = 1, to = 1000) Float)

FontSetting option for custom weight for font.

Public functions

weight

Added in 1.2.0-alpha03
@RequiresSchemaVersion(major = 1, minor = 400)
java-static fun weight(value: @FloatRange(from = 1, to = 1000) Float): LayoutElementBuilders.FontSetting

FontSetting option for custom weight for font. Similar to the FontWeightProp but it accepts any value between 1 and 1000.

Note that using this FontSetting will override setWeight.

Parameters
value: @FloatRange(from = 1, to = 1000) Float

weight, in 1..1000

Throws
java.lang.IllegalArgumentException

if the given value is not between 1 and 1000.