FontSourceType enumeration
FontSourceType enumeration
Specifies the type of a font source.
Members
Name | Description |
---|---|
FONT_FILE | A FileFontSource object that represents single font file. |
FONTS_FOLDER | A FolderFontSource object that represents folder with font files. |
MEMORY_FONT | A MemoryFontSource object that represents single font in memory. |
SYSTEM_FONTS | A SystemFontSource object that represents all fonts installed to the system. |
FONT_STREAM | 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.
file_font_source = aw.fonts.FileFontSource(MY_DIR + "Alte DIN 1451 Mittelschrift.ttf", 0)
doc = aw.Document()
doc.font_settings = aw.fonts.FontSettings()
doc.font_settings.set_fonts_sources([file_font_source])
self.assertEqual(MY_DIR + "Alte DIN 1451 Mittelschrift.ttf", file_font_source.file_path)
self.assertEqual(aw.fonts.FontSourceType.FONT_FILE, file_font_source.type)
self.assertEqual(0, file_font_source.priority)
See Also
- module aspose.words.fonts