Table of Contents

Class FontFeature

Namespace
Avalonia.Media
Assembly
Avalonia.Base.dll

Font feature

public record FontFeature : IEquatable<FontFeature>
Inheritance
FontFeature
Implements
Inherited Members

Constructors

FontFeature()

Creates an instance of FontFeature.

public FontFeature()

FontFeature(FontFeature)

protected FontFeature(FontFeature original)

Parameters

original FontFeature

Properties

End

Gets or sets the end.

public int End { get; init; }

Property Value

int

EqualityContract

protected virtual Type EqualityContract { get; }

Property Value

Type

Start

Gets or sets the start.

public int Start { get; init; }

Property Value

int

Tag

Gets or sets the tag.

public string Tag { get; init; }

Property Value

string

Value

Gets or sets the value.

public int Value { get; init; }

Property Value

int

Methods

Equals(FontFeature?)

public virtual bool Equals(FontFeature? other)

Parameters

other FontFeature

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

Parse(string)

Parses a string to return a FontFeature. Syntax is the following:

Syntax 	        Value 	Start 	End 	 
Setting value: 	  	  	  	 
kern 	        1 	    0 	    ∞ 	    Turn feature on
+kern 	        1 	    0 	    ∞ 	    Turn feature on
-kern 	        0 	    0 	    ∞ 	    Turn feature off
kern=0 	        0 	    0 	    ∞ 	    Turn feature off
kern=1 	        1 	    0 	    ∞ 	    Turn feature on
aalt=2 	        2 	    0 	    ∞ 	    Choose 2nd alternate
Setting index: 	  	  	  	 
kern[] 	        1 	    0 	    ∞ 	    Turn feature on
kern[:] 	    1 	    0 	    ∞ 	    Turn feature on
kern[5:] 	    1 	    5 	    ∞ 	    Turn feature on, partial
kern[:5] 	    1 	    0 	    5 	    Turn feature on, partial
kern[3:5] 	    1 	    3 	    5 	    Turn feature on, range
kern[3] 	    1 	    3 	    3+1 	Turn feature on, single char
Mixing it all: 	  	  	  	 
aalt[3:5]=2 	2 	    3 	    5 	    Turn 2nd alternate on for range
public static FontFeature Parse(string s)

Parameters

s string

The string.

Returns

FontFeature

The FontFeature.

PrintMembers(StringBuilder)

protected virtual bool PrintMembers(StringBuilder builder)

Parameters

builder StringBuilder

Returns

bool

ToString()

Gets a string representation of the FontFeature.

public override string ToString()

Returns

string

The string representation.

Operators

operator ==(FontFeature?, FontFeature?)

public static bool operator ==(FontFeature? left, FontFeature? right)

Parameters

left FontFeature
right FontFeature

Returns

bool

operator !=(FontFeature?, FontFeature?)

public static bool operator !=(FontFeature? left, FontFeature? right)

Parameters

left FontFeature
right FontFeature

Returns

bool