Interface IFontCollection
public interface IFontCollection : IReadOnlyList<FontFamily>, IReadOnlyCollection<FontFamily>, IEnumerable<FontFamily>, IEnumerable, IDisposable
- Inherited Members
Properties
Key
Get the font collection's key.
Uri Key { get; }
Property Value
- Uri
Methods
Initialize(IFontManagerImpl)
Initializes the font collection.
void Initialize(IFontManagerImpl fontManager)
Parameters
fontManager
IFontManagerImplThe font manager the collection is registered with.
TryGetGlyphTypeface(string, FontStyle, FontWeight, FontStretch, out IGlyphTypeface?)
Try to get a glyph typeface for given parameters.
bool TryGetGlyphTypeface(string familyName, FontStyle style, FontWeight weight, FontStretch stretch, out IGlyphTypeface? glyphTypeface)
Parameters
familyName
stringThe family name.
style
FontStyleThe font style.
weight
FontWeightThe font weight.
stretch
FontStretchThe font stretch.
glyphTypeface
IGlyphTypefaceThe glyph typeface.
Returns
- bool
Returns
true
if a glyph typface can be found; otherwise,false
TryMatchCharacter(int, FontStyle, FontWeight, FontStretch, string?, CultureInfo?, out Typeface)
Tries to match a specified character to a Typeface that supports specified font properties.
bool TryMatchCharacter(int codepoint, FontStyle fontStyle, FontWeight fontWeight, FontStretch fontStretch, string? familyName, CultureInfo? culture, out Typeface typeface)
Parameters
codepoint
intThe codepoint to match against.
fontStyle
FontStyleThe font style.
fontWeight
FontWeightThe font weight.
fontStretch
FontStretchThe font stretch.
familyName
stringThe family name. This is optional and used for fallback lookup.
culture
CultureInfoThe culture.
typeface
TypefaceThe matching Typeface.
Returns
- bool
True
, if the FontManager could match the character to specified parameters,False
otherwise.