UIKit.UIFontDescriptor.FeatureSettings Property
Typographic and layout feature settings.

Syntax

public UIFontFeature[] FeatureSettings { get; }

Value

Remarks

This property is an array of UIFontFeature objects, each representing a font-specific typograph or layout feature that can be enabled in the font. For background on Font Features, you can read https://developer.apple.com/fonts/registry

The following example shows how to configure the font to use proportional numbers as well as informing the rendering engine to use the 1st Character Alternatives available in this font.

C# Example

UIFont CustomizeFont (UIFont font)
{
    var originalDescriptor = font.FontDescriptor;
    var attributes = new UIFontAttributes (
        new UIFontFeature (CTFontFeatureNumberSpacing.Selector.ProportionalNumbers),
	new UIFontFeature ((CTFontFeatureCharacterAlternatives.Selector)1));

    var newDesc = originalDescriptor.CreateWithAttributes (attributes);
    return UIFont.FromDescriptor (newDesc, 80);
}

This can be used from a background thread.

Requirements

Namespace: UIKit
Assembly: Xamarin.iOS (in Xamarin.iOS.dll)
Assembly Versions: 0.0.0.0