Type
MemoryFontSource.Type property
Returns the type of the font source.
public override FontSourceType Type { get; }
Examples
Shows how to use a byte array with data from a font file as a font source.
byte[] fontBytes = File.ReadAllBytes(MyDir + "Alte DIN 1451 Mittelschrift.ttf");
MemoryFontSource memoryFontSource = new MemoryFontSource(fontBytes, 0);
Document doc = new Document();
doc.FontSettings = new FontSettings();
doc.FontSettings.SetFontsSources(new FontSourceBase[] {memoryFontSource});
Assert.AreEqual(FontSourceType.MemoryFont, memoryFontSource.Type);
Assert.AreEqual(0, memoryFontSource.Priority);
See Also
- enum FontSourceType
- class MemoryFontSource
- namespace Aspose.Words.Fonts
- assembly Aspose.Words