Språk

Typeface.CustomFallbackBuilder.SetStyle(FontStyle) Method

Definition

Sets a font style of the Typeface.

[Android.Runtime.Register("setStyle", "(Landroid/graphics/fonts/FontStyle;)Landroid/graphics/Typeface$CustomFallbackBuilder;", "", ApiSince=29)]
public Android.Graphics.Typeface.CustomFallbackBuilder SetStyle(Android.Graphics.Fonts.FontStyle style);
[<Android.Runtime.Register("setStyle", "(Landroid/graphics/fonts/FontStyle;)Landroid/graphics/Typeface$CustomFallbackBuilder;", "", ApiSince=29)>]
member this.SetStyle : Android.Graphics.Fonts.FontStyle -> Android.Graphics.Typeface.CustomFallbackBuilder

Parameters

style
FontStyle

a font style. This value cannot be null.

Returns

The builder after setting the requested font style.

Attributes

Remarks

Sets a font style of the Typeface. If the font family doesn't have a font of the given style, the system selects the closest font from the family. For example, if a family has only two non-variable fonts of weights 300 and 700 with the same slant, a requested weight of 400 selects the font of weight 300 when its slant also matches.

Android reference for android.graphics.Typeface.CustomFallbackBuilder.setStyle.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to