setFontVariationSettings

@RequiresApi(value = 26)
open fun setFontVariationSettings(@Nullable variationSettings: @Nullable String): Boolean

Set font variation settings. See setFontVariationSettings for details.

Note: Due to performance optimizations, getPaint().getFontVariationSettings() will be less reliable than if not using AppCompatTextView. You should prefer getFontVariationSettings, which will be more accurate. However, neither approach will work correctly if using Typeface objects with embedded font variation settings.