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
Method | Description |
---|---|
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:
Parameter | Type | Description |
---|---|---|
substituted | java.lang.String | The substituted font name. |
substitution | java.lang.String | The substitution font name. |
addFont(InputStream stream)
public final void addFont(InputStream stream)
Adds the font.
Parameters:
Parameter | Type | Description |
---|---|---|
stream | java.io.InputStream | The stream containing the font. |
addFont(String file)
public final void addFont(String file)
Adds the font.
Parameters:
Parameter | Type | Description |
---|---|---|
file | java.lang.String | The 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:
Parameter | Type | Description |
---|---|---|
folder | java.lang.String | The folder containing fonts. |
getFontFamily(String fontName)
public Font getFontFamily(String fontName)
Gets font.
Parameters:
Parameter | Type | Description |
---|---|---|
fontName | java.lang.String | The font name. |
Returns: java.awt.Font - The Font.