Table of Contents

Class StylesheetFontsCollection

Namespace
Myra.Graphics2D.UI.Styles
Assembly
Myra.dll

Represents a collection of StylesheetFont objects used by a stylesheet.

[XmlName("Fonts")]
public class StylesheetFontsCollection : IEnumerable<StylesheetFont>, IEnumerable
Inheritance
StylesheetFontsCollection
Implements
Inherited Members

Properties

AtlasUsedSpace

Gets or sets the atlas used space rectangle for the font collection.

[XmlName("UsedSpace")]
public Rectangle? AtlasUsedSpace { get; set; }

Property Value

Rectangle?

Count

Gets the number of fonts in the collection.

public int Count { get; }

Property Value

int

Fonts

Gets the underlying dictionary of fonts keyed by identifier.

public Dictionary<string, StylesheetFont> Fonts { get; }

Property Value

Dictionary<string, StylesheetFont>

this[string]

Gets or sets a font by its identifier.

public StylesheetFont this[string id] { get; set; }

Parameters

id string

The font identifier.

Property Value

StylesheetFont

Methods

GetEnumerator()

public IEnumerator<StylesheetFont> GetEnumerator()

Returns

IEnumerator<StylesheetFont>

TryGetValue(string, out StylesheetFont)

Attempts to retrieve a font by its identifier.

public bool TryGetValue(string id, out StylesheetFont font)

Parameters

id string

The font identifier.

font StylesheetFont

When this method returns, contains the font associated with the specified identifier, if found.

Returns

bool

true if a font with the specified identifier exists; otherwise, false.