LayoutElementBuilders.FontSetting
@RequiresSchemaVersion(major = 1, minor = 400)
public interface LayoutElementBuilders.FontSetting
Interface defining a single point of customization in a font.
Summary
Public methods |
|
|---|---|
default static @NonNull LayoutElementBuilders.FontSetting |
@RequiresSchemaVersion(major = 1, minor = 400)
|
default static @NonNull LayoutElementBuilders.FontSetting |
@RequiresSchemaVersion(major = 1, minor = 400)
|
default static @NonNull LayoutElementBuilders.FontSetting |
@RequiresSchemaVersion(major = 1, minor = 400)
|
default static @NonNull LayoutElementBuilders.FontSetting |
@RequiresSchemaVersion(major = 1, minor = 400)
|
Public methods
roundness
@RequiresSchemaVersion(major = 1, minor = 400)
default static @NonNull LayoutElementBuilders.FontSetting roundness(int value)
FontSetting option for custom roundness for font. For more information, see here.
| Parameters | |
|---|---|
int value |
roundness, usually in 0..100, but actual range and availability can depend on the font used |
tabularNum
@RequiresSchemaVersion(major = 1, minor = 400)
default static @NonNull LayoutElementBuilders.FontSetting tabularNum()
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
@RequiresSchemaVersion(major = 1, minor = 400)
default static @NonNull LayoutElementBuilders.FontSetting weight(@IntRange(from = 1, to = 1000) int value)
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 | |
|---|---|
@IntRange(from = 1, to = 1000) int value |
weight, usually in 1..1000, but actual range can be smaller, depending on the font used |
width
@RequiresSchemaVersion(major = 1, minor = 400)
default static @NonNull LayoutElementBuilders.FontSetting width(@FloatRange(from = 25, to = 200) float value)
FontSetting option for custom width for font. For more information, see here.
| Parameters | |
|---|---|
@FloatRange(from = 25, to = 200) float value |
width, usually in 25..200, but actual range can depend on the font used |