Class GlyphMap
Represents a collection that stores info about font glyphs and maps them to their keys.
public sealed class GlyphMap : KeyedCollection<int, FontGlyph>, IList<FontGlyph>, ICollection<FontGlyph>, IReadOnlyList<FontGlyph>, IReadOnlyCollection<FontGlyph>, IEnumerable<FontGlyph>, IList, ICollection, IReadOnlyDictionary<int, FontGlyph>, IReadOnlyCollection<KeyValuePair<int, FontGlyph>>, IEnumerable<KeyValuePair<int, FontGlyph>>, IEnumerable
- Inheritance
-
GlyphMap
- Implements
- Inherited Members
- Extension Methods
Remarks
Note that for fonts with less than 256 characters map will use list for storage instead of dictionary so it will be efficient in terms of memory despite some lookup slowness.
Constructors
GlyphMap()
Represents a collection that stores info about font glyphs and maps them to their keys.
public GlyphMap()
Remarks
Note that for fonts with less than 256 characters map will use list for storage instead of dictionary so it will be efficient in terms of memory despite some lookup slowness.
Properties
Keys
Gets an enumerable collection that contains the keys in the read-only dictionary.
public IEnumerable<int> Keys { get; }
Property Value
- IEnumerable<int>
An enumerable collection that contains the keys in the read-only dictionary.
Values
Gets an enumerable collection that contains the values in the read-only dictionary.
public IEnumerable<FontGlyph> Values { get; }
Property Value
- IEnumerable<FontGlyph>
An enumerable collection that contains the values in the read-only dictionary.
Methods
ContainsKey(int)
Determines whether the read-only dictionary contains an element that has the specified key.
public bool ContainsKey(int key)
Parameters
keyintThe key to locate.
Returns
- bool
true if the read-only dictionary contains an element that has the specified key; otherwise, false.
Exceptions
- ArgumentNullException
keyis null.
GetKeyForItem(FontGlyph)
When implemented in a derived class, extracts the key from the specified element.
protected override int GetKeyForItem(FontGlyph item)
Parameters
itemFontGlyphThe element from which to extract the key.
Returns
- int
The key for the specified element.