Skip to main content

FontVariation Struct

Definition​

Namespace:Avalonia.Media
Assembly:Avalonia.Base
Package:Avalonia

A single variation axis setting in designer units, e.g. wght = 700.

public struct FontVariation

Inheritance: ValueType -> FontVariation

Implements: IEquatable<FontVariation>

Constructors​

NameDescription
FontVariationA single variation axis setting in designer units, e.g. wght = 700.

FontVariation Constructor​

A single variation axis setting in designer units, e.g. wght = 700.

public FontVariation(Avalonia.Media.Fonts.OpenTypeTag Tag, double Value)

Parameters​

Tag Avalonia.Media.Fonts.OpenTypeTag

The OpenType axis tag (e.g. wght, wdth, opsz).

Value double

The axis position in the font's user coordinate space — the same units the font's fvar table declares for the axis (weight 100–900, width percentages, optical sizes in points). Values are clamped to the axis range and normalized per font when the settings are applied; axes a font does not declare are ignored.

Methods​

NameDescription
DeconstructNo summary available.
Equals (2 overloads)No summary available.
GetHashCodeNo summary available.
ToStringReturns the tag=value form, e.g. wght=700.

Deconstruct Method​

public void Deconstruct(Avalonia.Media.Fonts.OpenTypeTag& Tag, double& Value)

Parameters​

Tag Avalonia.Media.Fonts.OpenTypeTag&

Value double&

Equals overloads​

Equals Method​

public bool Equals(Avalonia.Media.FontVariation other)
Parameters​

other Avalonia.Media.FontVariation

Returns​

bool

Equals Method​

public bool Equals(object obj)
Parameters​

obj object

Returns​

bool

GetHashCode Method​

public int GetHashCode()

Returns​

int

ToString Method​

Returns the tag=value form, e.g. wght=700.

public string ToString()

Returns​

string

Properties​

NameDescription
TagThe OpenType axis tag (e.g. wght, wdth, opsz).
ValueThe axis position in the font's user coordinate space — the same units the font's fvar table declares for the axis (weight 100–900, width percentages, optical sizes in points). Values are clamped to the axis range and normalized per font when the settings are applied; axes a font does not declare are ignored.

Tag Property​

The OpenType axis tag (e.g. wght, wdth, opsz).

public Avalonia.Media.Fonts.OpenTypeTag Tag { get; set; }

Value Property​

The axis position in the font's user coordinate space — the same units the font's fvar table declares for the axis (weight 100–900, width percentages, optical sizes in points). Values are clamped to the axis range and normalized per font when the settings are applied; axes a font does not declare are ignored.

public double Value { get; set; }