FontSourceType
Contents
[
Hide
]FontSourceType enumeration
Specifies the type of font source.
public enum FontSourceType
Values
Name | Value | Description |
---|---|---|
FontFile | 0 | A FileFontSource object that represents single font file. |
FontsFolder | 1 | A FolderFontSource object that represents folder with font files. |
MemoryFont | 2 | A MemoryFontSource object that represents single font in memory. |
SystemFonts | 3 | A SystemFontSource object that represents all fonts installed to the system. |
FontStream | 4 | A StreamFontSource object that represents a stream with font data. |
Examples
Shows how to use a font file in the local file system as a font source.
FileFontSource fileFontSource = new FileFontSource(MyDir + "Alte DIN 1451 Mittelschrift.ttf", 0);
Document doc = new Document();
doc.FontSettings = new FontSettings();
doc.FontSettings.SetFontsSources(new FontSourceBase[] {fileFontSource});
Assert.AreEqual(MyDir + "Alte DIN 1451 Mittelschrift.ttf", fileFontSource.FilePath);
Assert.AreEqual(FontSourceType.FontFile, fileFontSource.Type);
Assert.AreEqual(0, fileFontSource.Priority);
See Also
- namespace Aspose.Words.Fonts
- assembly Aspose.Words