com.aspose.words
Class FontSourceType

java.lang.Object
    extended by 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 create a file font source.
Document doc = new Document();

// Create a font settings object for our document
doc.setFontSettings(new FontSettings());

// Create a font source from a file in our system
FileFontSource fileFontSource = new FileFontSource(getMyDir() + "Alte DIN 1451 Mittelschrift.ttf", 0);

// Import the font source into our document
doc.getFontSettings().setFontsSources(new FontSourceBase[]{fileFontSource});

Assert.assertEquals(fileFontSource.getFilePath(), getMyDir() + "Alte DIN 1451 Mittelschrift.ttf");
Assert.assertEquals(fileFontSource.getType(), FontSourceType.FONT_FILE);
Assert.assertEquals(fileFontSource.getPriority(), 0);

Field Summary
static final intFONT_FILE = 0
           A FileFontSource object that represents single font file.
static final intFONTS_FOLDER = 1
           A FolderFontSource object that represents folder with font files.
static final intMEMORY_FONT = 2
           A MemoryFontSource object that represents single font in memory.
static final intSYSTEM_FONTS = 3
           A SystemFontSource object that represents all fonts installed to the system.
static final intFONT_STREAM = 4
           A StreamFontSource object that represents a stream with font data.
 

Field Detail

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.