public interface

LayoutElementBuilders.FontSetting

 androidx.wear.protolayout.LayoutElementBuilders.FontSetting

Overview

Interface defining a single point of customization in a font.

Summary

Methods
public FingerprintgetFingerprint()

Get the fingerprint for this object or null if unknown.

public static LayoutElementBuilders.FontSettingtabularNum()

LayoutElementBuilders.FontSetting option for enabling displaying tabular numerals.

public LayoutElementProto.FontSettingtoFontSettingProto()

Get the protocol buffer representation of this object.

public static LayoutElementBuilders.FontSettingweight(int value)

LayoutElementBuilders.FontSetting option for custom weight for font.

public static LayoutElementBuilders.FontSettingwidth(float value)

LayoutElementBuilders.FontSetting option for custom width for font.

Methods

public LayoutElementProto.FontSetting toFontSettingProto()

Get the protocol buffer representation of this object.

public static LayoutElementBuilders.FontSetting weight(int value)

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

Note that using this LayoutElementBuilders.FontSetting will override LayoutElementBuilders.FontStyle.Builder.setWeight(LayoutElementBuilders.FontWeightProp).

Parameters:

value: weight, usually in 1..1000, but actual range can be smaller, depending on the font used

public static LayoutElementBuilders.FontSetting width(float value)

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

Parameters:

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

public static LayoutElementBuilders.FontSetting tabularNum()

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.

public Fingerprint getFingerprint()

Get the fingerprint for this object or null if unknown.