FontSourceType enumeration

FontSourceType enumeration

Specifies the type of a font source.


FONT_FILEA FileFontSource object that represents single font file.
FONTS_FOLDERA FolderFontSource object that represents folder with font files.
MEMORY_FONTA MemoryFontSource object that represents single font in memory.
SYSTEM_FONTSA SystemFontSource object that represents all fonts installed to the system.
FONT_STREAMA StreamFontSource object that represents a stream with font data.


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()

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