FontSourceType Enumeration |
Specifies the type of a font source.
Namespace:
Aspose.Words.Fonts
Assembly:
Aspose.Words (in Aspose.Words.dll) Version: 20.3
Syntaxpublic enum FontSourceType
Public Enumeration FontSourceType
public enum class FontSourceType
Members|
| Member 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.
|
ExamplesShows how to create a file font source.
Document doc = new Document();
doc.FontSettings = new FontSettings();
FileFontSource fileFontSource = new FileFontSource(MyDir + "Alte DIN 1451 Mittelschrift.ttf", 0);
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