Skip to content
ChartForgeX
Class

FontVariationSettings

ChartForgeX.Typography

Namespace
ChartForgeX.Typography
Assembly
ChartForgeX
Implements
IReadOnlyDictionary<string, double> IReadOnlyCollection<KeyValuePair<string, double>> IEnumerable<KeyValuePair<string, double>> IEnumerable
Modifiers
sealed
Attributes
DefaultMember("Item")

Immutable, case-sensitive OpenType axis coordinates in the font's design units. Unknown axes are ignored by a face; supported values are clamped to its declared range.

Inheritance

  • object
  • FontVariationSettings

Usage

Explore 8 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Accepted by parameters 4

Constructors

FontVariationSettings 2 overloads
public FontVariationSettings() #

Creates the default instance.

public FontVariationSettings(IEnumerable<KeyValuePair<string, double>> axes) #

Copies axis coordinates. Tags contain exactly four ASCII letters or digits; values must be finite. A specification can contain at most 32 axes.

Parameters

axes System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string, double>> required

Methods

public bool ContainsKey(string key) #

Tests whether an axis is explicitly selected.

Parameters

key string required

Returns

bool
public IEnumerator<KeyValuePair<string, double>> GetEnumerator() #

Enumerates selected coordinates in tag order.

Returns

IEnumerator<KeyValuePair<string, double>>
public bool TryGetValue(string key, out double value) #

Reads an explicitly selected design coordinate.

Parameters

key string required
value double required

Returns

bool
public FontVariationSettings WithAxis(string tag, double value) #

Returns an independent selection with one axis set or replaced.

Parameters

tag string required
value double required

Properties

public static FontVariationSettings Default { get; } #

The font's default instance, without explicit axis coordinates.

public int Count { get; } #

The number of explicitly selected axes.

public IEnumerable<string> Keys { get; } #

The selected axis tags.

public IEnumerable<double> Values { get; } #

The selected design coordinates.

public double this[string key] { get; } #

Gets a selected design coordinate.

Parameters

key string required