Udostępnij za pośrednictwem


FontVariationAxis.FromFontVariationSettings(String) Method

Definition

Construct FontVariationAxis array from font variation settings.

[Android.Runtime.Register("fromFontVariationSettings", "(Ljava/lang/String;)[Landroid/graphics/fonts/FontVariationAxis;", "", ApiSince=26)]
public static Android.Graphics.Fonts.FontVariationAxis[]? FromFontVariationSettings (string? settings);
[<Android.Runtime.Register("fromFontVariationSettings", "(Ljava/lang/String;)[Landroid/graphics/fonts/FontVariationAxis;", "", ApiSince=26)>]
static member FromFontVariationSettings : string -> Android.Graphics.Fonts.FontVariationAxis[]

Parameters

settings
String

font variation settings.

Returns

FontVariationAxis[] the array of parsed font variation axis. null if settings has no font variation settings.

Attributes

Remarks

Construct FontVariationAxis array from font variation settings.

The settings string is constructed from multiple pairs of axis tag and style values. The axis tag must contain four ASCII characters and must be wrapped with single quotes (U+0027) or double quotes (U+0022). Axis strings that are longer or shorter than four characters, or contain characters outside of U+0020..U+007E are invalid. If a specified axis name is not defined in the font, the settings will be ignored.

FontVariationAxis.fromFontVariationSettings("'wdth' 1.0");
              FontVariationAxis.fromFontVariationSettings("'AX  ' 1.0, 'FB  ' 2.0");

Java documentation for android.graphics.fonts.FontVariationAxis.fromFontVariationSettings(java.lang.String).

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