public final class

LayoutElementProto.FontStyle

extends <any>

implements LayoutElementProto.FontStyleOrBuilder

 java.lang.Object

↳<any>

↳androidx.wear.protolayout.proto.LayoutElementProto.FontStyle

Overview

 The styling of a font (e.g. font size, and metrics).
 
Protobuf type androidx.wear.protolayout.proto.FontStyle

Summary

Fields
public static final intCOLOR_FIELD_NUMBER

public static final intITALIC_FIELD_NUMBER

public static final intLETTER_SPACING_FIELD_NUMBER

public static final intPREFERRED_FONT_FAMILIES_FIELD_NUMBER

public static final intSETTINGS_FIELD_NUMBER

public static final intSIZE_FIELD_NUMBER

public static final intUNDERLINE_FIELD_NUMBER

public static final intVARIANT_FIELD_NUMBER

public static final intWEIGHT_FIELD_NUMBER

Methods
protected final java.lang.ObjectdynamicMethod(com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, java.lang.Object arg0, java.lang.Object arg1)

public ColorProto.ColorPropgetColor()

 The text color.

public static LayoutElementProto.FontStylegetDefaultInstance()

public TypesProto.BoolPropgetItalic()

 Whether the text should be rendered in a italic typeface.

public DimensionProto.EmPropgetLetterSpacing()

 The text letter-spacing.

public java.lang.StringgetPreferredFontFamilies(int index)

 The prioritized collection of font family names describing which font
 should be used for this FontStyle and its fallback values if not available.

public com.google.protobuf.ByteStringgetPreferredFontFamiliesBytes(int index)

 The prioritized collection of font family names describing which font
 should be used for this FontStyle and its fallback values if not available.

public intgetPreferredFontFamiliesCount()

 The prioritized collection of font family names describing which font
 should be used for this FontStyle and its fallback values if not available.

public java.util.List<java.lang.String>getPreferredFontFamiliesList()

 The prioritized collection of font family names describing which font
 should be used for this FontStyle and its fallback values if not available.

public LayoutElementProto.FontSettinggetSettings(int index)

 The collection of font settings to be applied.

public intgetSettingsCount()

 The collection of font settings to be applied.

public java.util.List<LayoutElementProto.FontSetting>getSettingsList()

 The collection of font settings to be applied.

public LayoutElementProto.FontSettingOrBuildergetSettingsOrBuilder(int index)

 The collection of font settings to be applied.

public java.util.List<LayoutElementProto.FontSettingOrBuilder>getSettingsOrBuilderList()

 The collection of font settings to be applied.

public DimensionProto.SpPropgetSize(int index)

 The available sizes of the font, in scaled pixels (sp).

public intgetSizeCount()

 The available sizes of the font, in scaled pixels (sp).

public java.util.List<DimensionProto.SpProp>getSizeList()

 The available sizes of the font, in scaled pixels (sp).

public DimensionProto.SpPropOrBuildergetSizeOrBuilder(int index)

 The available sizes of the font, in scaled pixels (sp).

public java.util.List<DimensionProto.SpPropOrBuilder>getSizeOrBuilderList()

 The available sizes of the font, in scaled pixels (sp).

public TypesProto.BoolPropgetUnderline()

 Whether the text should be rendered with an underline.

public LayoutElementProto.FontVariantPropgetVariant()

 The variant of a font.

public LayoutElementProto.FontWeightPropgetWeight()

 The weight of the font.

public booleanhasColor()

 The text color.

public booleanhasItalic()

 Whether the text should be rendered in a italic typeface.

public booleanhasLetterSpacing()

 The text letter-spacing.

public booleanhasUnderline()

 Whether the text should be rendered with an underline.

public booleanhasVariant()

 The variant of a font.

public booleanhasWeight()

 The weight of the font.

public static LayoutElementProto.FontStyle.BuildernewBuilder()

public static LayoutElementProto.FontStyle.BuildernewBuilder(LayoutElementProto.FontStyle prototype)

public static LayoutElementProto.FontStyleparseDelimitedFrom(java.io.InputStream input)

public static LayoutElementProto.FontStyleparseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)

public static LayoutElementProto.FontStyleparseFrom(byte[] data[], com.google.protobuf.ExtensionRegistryLite extensionRegistry)

public static LayoutElementProto.FontStyleparseFrom(java.nio.ByteBuffer data)

public static LayoutElementProto.FontStyleparseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)

public static LayoutElementProto.FontStyleparseFrom(com.google.protobuf.ByteString data)

public static LayoutElementProto.FontStyleparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)

public static LayoutElementProto.FontStyleparseFrom(com.google.protobuf.CodedInputStream input)

public static LayoutElementProto.FontStyleparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)

public static LayoutElementProto.FontStyleparseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)

public static <any>parser()

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Fields

public static final int SIZE_FIELD_NUMBER

public static final int ITALIC_FIELD_NUMBER

public static final int UNDERLINE_FIELD_NUMBER

public static final int COLOR_FIELD_NUMBER

public static final int WEIGHT_FIELD_NUMBER

public static final int LETTER_SPACING_FIELD_NUMBER

public static final int VARIANT_FIELD_NUMBER

public static final int SETTINGS_FIELD_NUMBER

public static final int PREFERRED_FONT_FAMILIES_FIELD_NUMBER

Methods

public java.util.List<DimensionProto.SpProp> getSizeList()

 The available sizes of the font, in scaled pixels (sp). If not specified,
 defaults to the size of the system's "body" font.

 If more than one size is specified and this FontStyle is applied to a Text
 element with static text, the text size will be automatically picked from
 the provided sizes to try to perfectly fit within its parent bounds. In
 other words, the largest size from the specified preset sizes that can fit
 the most text within the parent bounds will be used.

 The specified sizes don't have to be sorted. The maximum number of sizes
 used is limited to 10.

 Note that, if multiple sizes are set, the parent of the Text element this
 corresponds to shouldn't have its width and height set to wrapped, as it
 can lead to unexpected results.

 If this FontStyle is set to any other element besides Text, or that Text
 element has dynamic field, only the last added size will be use.

 Any previously added values with this method or #setSize will be cleared.

 While this field is accessible from 1.0 as singular, it only accepts
 multiple values since version 1.3 and renderers supporting version 1.3 will
 use the multiple values to automatically scale text. Renderers who don't
 support this version will use the first size among multiple values.
 
repeated .androidx.wear.protolayout.proto.SpProp size = 1;

public java.util.List<DimensionProto.SpPropOrBuilder> getSizeOrBuilderList()

 The available sizes of the font, in scaled pixels (sp). If not specified,
 defaults to the size of the system's "body" font.

 If more than one size is specified and this FontStyle is applied to a Text
 element with static text, the text size will be automatically picked from
 the provided sizes to try to perfectly fit within its parent bounds. In
 other words, the largest size from the specified preset sizes that can fit
 the most text within the parent bounds will be used.

 The specified sizes don't have to be sorted. The maximum number of sizes
 used is limited to 10.

 Note that, if multiple sizes are set, the parent of the Text element this
 corresponds to shouldn't have its width and height set to wrapped, as it
 can lead to unexpected results.

 If this FontStyle is set to any other element besides Text, or that Text
 element has dynamic field, only the last added size will be use.

 Any previously added values with this method or #setSize will be cleared.

 While this field is accessible from 1.0 as singular, it only accepts
 multiple values since version 1.3 and renderers supporting version 1.3 will
 use the multiple values to automatically scale text. Renderers who don't
 support this version will use the first size among multiple values.
 
repeated .androidx.wear.protolayout.proto.SpProp size = 1;

public int getSizeCount()

 The available sizes of the font, in scaled pixels (sp). If not specified,
 defaults to the size of the system's "body" font.

 If more than one size is specified and this FontStyle is applied to a Text
 element with static text, the text size will be automatically picked from
 the provided sizes to try to perfectly fit within its parent bounds. In
 other words, the largest size from the specified preset sizes that can fit
 the most text within the parent bounds will be used.

 The specified sizes don't have to be sorted. The maximum number of sizes
 used is limited to 10.

 Note that, if multiple sizes are set, the parent of the Text element this
 corresponds to shouldn't have its width and height set to wrapped, as it
 can lead to unexpected results.

 If this FontStyle is set to any other element besides Text, or that Text
 element has dynamic field, only the last added size will be use.

 Any previously added values with this method or #setSize will be cleared.

 While this field is accessible from 1.0 as singular, it only accepts
 multiple values since version 1.3 and renderers supporting version 1.3 will
 use the multiple values to automatically scale text. Renderers who don't
 support this version will use the first size among multiple values.
 
repeated .androidx.wear.protolayout.proto.SpProp size = 1;

public DimensionProto.SpProp getSize(int index)

 The available sizes of the font, in scaled pixels (sp). If not specified,
 defaults to the size of the system's "body" font.

 If more than one size is specified and this FontStyle is applied to a Text
 element with static text, the text size will be automatically picked from
 the provided sizes to try to perfectly fit within its parent bounds. In
 other words, the largest size from the specified preset sizes that can fit
 the most text within the parent bounds will be used.

 The specified sizes don't have to be sorted. The maximum number of sizes
 used is limited to 10.

 Note that, if multiple sizes are set, the parent of the Text element this
 corresponds to shouldn't have its width and height set to wrapped, as it
 can lead to unexpected results.

 If this FontStyle is set to any other element besides Text, or that Text
 element has dynamic field, only the last added size will be use.

 Any previously added values with this method or #setSize will be cleared.

 While this field is accessible from 1.0 as singular, it only accepts
 multiple values since version 1.3 and renderers supporting version 1.3 will
 use the multiple values to automatically scale text. Renderers who don't
 support this version will use the first size among multiple values.
 
repeated .androidx.wear.protolayout.proto.SpProp size = 1;

public DimensionProto.SpPropOrBuilder getSizeOrBuilder(int index)

 The available sizes of the font, in scaled pixels (sp). If not specified,
 defaults to the size of the system's "body" font.

 If more than one size is specified and this FontStyle is applied to a Text
 element with static text, the text size will be automatically picked from
 the provided sizes to try to perfectly fit within its parent bounds. In
 other words, the largest size from the specified preset sizes that can fit
 the most text within the parent bounds will be used.

 The specified sizes don't have to be sorted. The maximum number of sizes
 used is limited to 10.

 Note that, if multiple sizes are set, the parent of the Text element this
 corresponds to shouldn't have its width and height set to wrapped, as it
 can lead to unexpected results.

 If this FontStyle is set to any other element besides Text, or that Text
 element has dynamic field, only the last added size will be use.

 Any previously added values with this method or #setSize will be cleared.

 While this field is accessible from 1.0 as singular, it only accepts
 multiple values since version 1.3 and renderers supporting version 1.3 will
 use the multiple values to automatically scale text. Renderers who don't
 support this version will use the first size among multiple values.
 
repeated .androidx.wear.protolayout.proto.SpProp size = 1;

public boolean hasItalic()

 Whether the text should be rendered in a italic typeface. If not specified,
 defaults to "false".
 
.androidx.wear.protolayout.proto.BoolProp italic = 2;

public TypesProto.BoolProp getItalic()

 Whether the text should be rendered in a italic typeface. If not specified,
 defaults to "false".
 
.androidx.wear.protolayout.proto.BoolProp italic = 2;

public boolean hasUnderline()

 Whether the text should be rendered with an underline. If not specified,
 defaults to "false".
 
.androidx.wear.protolayout.proto.BoolProp underline = 3;

public TypesProto.BoolProp getUnderline()

 Whether the text should be rendered with an underline. If not specified,
 defaults to "false".
 
.androidx.wear.protolayout.proto.BoolProp underline = 3;

public boolean hasColor()

 The text color. If not defined, defaults to white.

 While this field is statically accessible from 1.0, it's only bindable
 since version 1.2 and renderers supporting version 1.2 will use the dynamic
 value (if set).
 
.androidx.wear.protolayout.proto.ColorProp color = 4;

public ColorProto.ColorProp getColor()

 The text color. If not defined, defaults to white.

 While this field is statically accessible from 1.0, it's only bindable
 since version 1.2 and renderers supporting version 1.2 will use the dynamic
 value (if set).
 
.androidx.wear.protolayout.proto.ColorProp color = 4;

public boolean hasWeight()

 The weight of the font. If the provided value is not supported on a
 platform, the nearest supported value will be used. If not defined, or
 when set to an invalid value, defaults to "normal".
 
.androidx.wear.protolayout.proto.FontWeightProp weight = 5;

 The weight of the font. If the provided value is not supported on a
 platform, the nearest supported value will be used. If not defined, or
 when set to an invalid value, defaults to "normal".
 
.androidx.wear.protolayout.proto.FontWeightProp weight = 5;

public boolean hasLetterSpacing()

 The text letter-spacing. Positive numbers increase the space between
 letters while negative numbers tighten the space. If not specified,
 defaults to 0.
 
.androidx.wear.protolayout.proto.EmProp letter_spacing = 6;

public DimensionProto.EmProp getLetterSpacing()

 The text letter-spacing. Positive numbers increase the space between
 letters while negative numbers tighten the space. If not specified,
 defaults to 0.
 
.androidx.wear.protolayout.proto.EmProp letter_spacing = 6;

public boolean hasVariant()

 The variant of a font. Some renderers may use different fonts for title and
 body text, which can be selected using this field. If not specified,
 defaults to "body".
 
.androidx.wear.protolayout.proto.FontVariantProp variant = 7;

 The variant of a font. Some renderers may use different fonts for title and
 body text, which can be selected using this field. If not specified,
 defaults to "body".
 
.androidx.wear.protolayout.proto.FontVariantProp variant = 7;

public java.util.List<LayoutElementProto.FontSetting> getSettingsList()

 The collection of font settings to be applied.

 Supported settings depend on the font used and renderer version.
 <setter>If this is used with the variable fonts on renderers
 supporting 1.4, weight and width setting will always be available.</setter>
 
repeated .androidx.wear.protolayout.proto.FontSetting settings = 8;

public java.util.List<LayoutElementProto.FontSettingOrBuilder> getSettingsOrBuilderList()

 The collection of font settings to be applied.

 Supported settings depend on the font used and renderer version.
 <setter>If this is used with the variable fonts on renderers
 supporting 1.4, weight and width setting will always be available.</setter>
 
repeated .androidx.wear.protolayout.proto.FontSetting settings = 8;

public int getSettingsCount()

 The collection of font settings to be applied.

 Supported settings depend on the font used and renderer version.
 <setter>If this is used with the variable fonts on renderers
 supporting 1.4, weight and width setting will always be available.</setter>
 
repeated .androidx.wear.protolayout.proto.FontSetting settings = 8;

public LayoutElementProto.FontSetting getSettings(int index)

 The collection of font settings to be applied.

 Supported settings depend on the font used and renderer version.
 <setter>If this is used with the variable fonts on renderers
 supporting 1.4, weight and width setting will always be available.</setter>
 
repeated .androidx.wear.protolayout.proto.FontSetting settings = 8;

public LayoutElementProto.FontSettingOrBuilder getSettingsOrBuilder(int index)

 The collection of font settings to be applied.

 Supported settings depend on the font used and renderer version.
 <setter>If this is used with the variable fonts on renderers
 supporting 1.4, weight and width setting will always be available.</setter>
 
repeated .androidx.wear.protolayout.proto.FontSetting settings = 8;

public java.util.List<java.lang.String> getPreferredFontFamiliesList()

 The prioritized collection of font family names describing which font
 should be used for this FontStyle and its fallback values if not available.
 For example, preferring default system variable font with default non
 variable system font as a fallback. <setter>If not set, defaults to system
 font.</setter>
 
repeated string preferred_font_families = 9;

Returns:

A list containing the preferredFontFamilies.

public int getPreferredFontFamiliesCount()

 The prioritized collection of font family names describing which font
 should be used for this FontStyle and its fallback values if not available.
 For example, preferring default system variable font with default non
 variable system font as a fallback. <setter>If not set, defaults to system
 font.</setter>
 
repeated string preferred_font_families = 9;

Returns:

The count of preferredFontFamilies.

public java.lang.String getPreferredFontFamilies(int index)

 The prioritized collection of font family names describing which font
 should be used for this FontStyle and its fallback values if not available.
 For example, preferring default system variable font with default non
 variable system font as a fallback. <setter>If not set, defaults to system
 font.</setter>
 
repeated string preferred_font_families = 9;

Parameters:

index: The index of the element to return.

Returns:

The preferredFontFamilies at the given index.

public com.google.protobuf.ByteString getPreferredFontFamiliesBytes(int index)

 The prioritized collection of font family names describing which font
 should be used for this FontStyle and its fallback values if not available.
 For example, preferring default system variable font with default non
 variable system font as a fallback. <setter>If not set, defaults to system
 font.</setter>
 
repeated string preferred_font_families = 9;

Parameters:

index: The index of the value to return.

Returns:

The bytes of the preferredFontFamilies at the given index.

public static LayoutElementProto.FontStyle parseFrom(java.nio.ByteBuffer data)

public static LayoutElementProto.FontStyle parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)

public static LayoutElementProto.FontStyle parseFrom(com.google.protobuf.ByteString data)

public static LayoutElementProto.FontStyle parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)

public static LayoutElementProto.FontStyle parseFrom(byte[] data[], com.google.protobuf.ExtensionRegistryLite extensionRegistry)

public static LayoutElementProto.FontStyle parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)

public static LayoutElementProto.FontStyle parseDelimitedFrom(java.io.InputStream input)

public static LayoutElementProto.FontStyle parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)

public static LayoutElementProto.FontStyle parseFrom(com.google.protobuf.CodedInputStream input)

public static LayoutElementProto.FontStyle parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)

public static LayoutElementProto.FontStyle.Builder newBuilder()

protected final java.lang.Object dynamicMethod(com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, java.lang.Object arg0, java.lang.Object arg1)

public static LayoutElementProto.FontStyle getDefaultInstance()

public static <any> parser()