MemoryFontSource Class
Wordize.Fonts.MemoryFontSource class. Represents the single TrueType font file stored in memory.
MemoryFontSource class
Represents the single TrueType font file stored in memory.
public class MemoryFontSource : FontSourceBase
Constructors
Name | Description |
---|---|
MemoryFontSource(byte[]) | Ctor. |
MemoryFontSource(byte[], int) | Ctor. |
MemoryFontSource(byte[], int, string) | Ctor. |
Properties
Name | Description |
---|---|
CacheKey { get; } | The key of this source in the cache. |
FontData { get; } | Binary font data. |
Priority { get; } | Returns the font source priority. |
Type { get; } | Returns the type of the font source. |
WarningCallback { get; set; } | Called during processing of font source when an issue is detected that might result in formatting fidelity loss. |
Methods
Name | Description |
---|---|
GetAvailableFonts() | Returns list of fonts available via this source. |
Examples
Demonstrates how specify memory font source.
byte[] fontBytes = File.ReadAllBytes(MyDir + @"MyFonts\NoticiaText-Regular.ttf");
MemoryFontSource memoryFontSource = new MemoryFontSource(fontBytes);
Wordize.Settings.DefaultFontSettings.SetFontsSources(new FontSourceBase[] { memoryFontSource });
See Also
- class FontSourceBase
- namespace Wordize.Fonts
- assembly Wordize