UIKit.UIFontFeature Class
Represents a single typographic or font layout feature.

See Also: UIFontFeature Members


public class UIFontFeature : ObjCRuntime.INativeObject


The UIFontFeature represents a specific typographic or font layout feature set to a particular value. These objects are both strongly typed and immutable and intended to assist developers in choosing which features to enable in a font by providing strong types for them.

Instances of these objects are created to be part of an array of desired features when creating a UIKit.UIFontAttributes. For example:

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);


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