FontsSubsystem

Inheritance: java.lang.Object

All Implemented Interfaces: com.aspose.note.fonts.IFontsSubsystem

public abstract class FontsSubsystem implements IFontsSubsystem

Base class implementing com.aspose.note.IFontsSubsystem interface. Provides functionality for default font and font’s substitutions. Override com.aspose.note.FontsSubsystem.fetchFontFamily protected member function in a derived class to implement logic for retrieving of Font object.

Methods

MethodDescription
getDefaultFont()Gets default font.
addFontSubstitution(String substituted, String substitution)Adds font substitution.
addFont(InputStream stream)Adds the font.
addFont(String file)Adds the font.
loadFontsFromFolder(String folder)Loads all TrueType fonts from specified folder to internal collection.
getFontFamily(String fontName)Gets font.

getDefaultFont()

public Font getDefaultFont()

Gets default font.

Returns: java.awt.Font

addFontSubstitution(String substituted, String substitution)

public final void addFontSubstitution(String substituted, String substitution)

Adds font substitution.

Parameters:

ParameterTypeDescription
substitutedjava.lang.StringThe substituted font name.
substitutionjava.lang.StringThe substitution font name.

addFont(InputStream stream)

public final void addFont(InputStream stream)

Adds the font.

Parameters:

ParameterTypeDescription
streamjava.io.InputStreamThe stream containing the font.

addFont(String file)

public final void addFont(String file)

Adds the font.

Parameters:

ParameterTypeDescription
filejava.lang.StringThe path to the file containing the font.

loadFontsFromFolder(String folder)

public final void loadFontsFromFolder(String folder)

Loads all TrueType fonts from specified folder to internal collection.

Parameters:

ParameterTypeDescription
folderjava.lang.StringThe folder containing fonts.

getFontFamily(String fontName)

public Font getFontFamily(String fontName)

Gets font.

Parameters:

ParameterTypeDescription
fontNamejava.lang.StringThe font name.

Returns: java.awt.Font - The Font.