java.lang.Object
com.aspose.words.FontSourceType
public class FontSourceType
- extends java.lang.Object
Utility class containing constants.
Specifies the type of a font source.
Example:
Shows how to use a font file in the local file system as a font source.
FileFontSource fileFontSource = new FileFontSource(getMyDir() + "Alte DIN 1451 Mittelschrift.ttf", 0);
Document doc = new Document();
doc.setFontSettings(new FontSettings());
doc.getFontSettings().setFontsSources(new FontSourceBase[]{fileFontSource});
Assert.assertEquals(getMyDir() + "Alte DIN 1451 Mittelschrift.ttf", fileFontSource.getFilePath());
Assert.assertEquals(FontSourceType.FONT_FILE, fileFontSource.getType());
Assert.assertEquals(0, fileFontSource.getPriority());
FONT_FILE = 0 | |
public static final int FONT_FILE |
-
A FileFontSource object that represents single font file.
FONTS_FOLDER = 1 | |
public static final int FONTS_FOLDER |
-
A FolderFontSource object that represents folder with font files.
MEMORY_FONT = 2 | |
public static final int MEMORY_FONT |
-
A MemoryFontSource object that represents single font in memory.
SYSTEM_FONTS = 3 | |
public static final int SYSTEM_FONTS |
-
A SystemFontSource object that represents all fonts installed to the system.
FONT_STREAM = 4 | |
public static final int FONT_STREAM |
-
A StreamFontSource object that represents a stream with font data.
See Also:
Aspose.Words Documentation - the home page for the Aspose.Words Product Documentation.
Aspose.Words Support Forum - our preferred method of support.