Paint.FontVariationOverride Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the current font variation override value. -or- Sets TrueType or OpenType font variation settings for overriding.
public virtual string? FontVariationOverride { [Android.Runtime.Register("getFontVariationOverride", "()Ljava/lang/String;", "GetGetFontVariationOverrideHandler", ApiSince=36)] get; [Android.Runtime.Register("setFontVariationOverride", "(Ljava/lang/String;)V", "GetSetFontVariationOverride_Ljava_lang_String_Handler", ApiSince=36)] set; }
[<get: Android.Runtime.Register("getFontVariationOverride", "()Ljava/lang/String;", "GetGetFontVariationOverrideHandler", ApiSince=36)>]
[<set: Android.Runtime.Register("setFontVariationOverride", "(Ljava/lang/String;)V", "GetSetFontVariationOverride_Ljava_lang_String_Handler", ApiSince=36)>]
member this.FontVariationOverride : string with get, set
Property Value
a current font variation override value.
- Attributes
Remarks
Property getter documentation:
Gets the current font variation override value.
Java documentation for android.graphics.Paint.getFontVariationOverride().
Property setter documentation:
Sets TrueType or OpenType font variation settings for overriding.
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 invalid font variation settings is provided, this method does nothing and returning false with printing error message to the logcat.
Different from #setFontVariationSettings(String), this overrides the font variation settings which is already assigned to the font instance. For example, if the underlying font is configured as 'wght' 500, 'ital' 1, and if the override is specified as 'wght' 700, `wdth` 150, then the effective font variation setting is `wght' 700, 'ital' 1, 'wdth' 150. The `wght` value is updated by override, 'ital' value is preserved because no overrides, and `wdth` value is added by override. If the font variation override is empty or null, nothing overrides and original font variation settings assigned to the font instance is used as it is.
Java documentation for android.graphics.Paint.setFontVariationOverride(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.