FontSourceType

FontSourceType enumeration

Specifies the type of a font source.

public enum FontSourceType

Values

NameValueDescription
FontFile0A FileFontSource object that represents single font file.
FontsFolder1A FolderFontSource object that represents folder with font files.
MemoryFont2A MemoryFontSource object that represents single font in memory.
SystemFonts3A SystemFontSource object that represents all fonts installed to the system.
FontStream4A 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