public abstract class FontsSubsystem extends Object 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.
Modifier and Type | Method and Description |
---|---|
void |
addFont(InputStream stream)
Adds the font.
|
void |
addFont(String file)
Adds the font.
|
void |
addFontSubstitution(String substituted,
String substitution)
Adds font substitution.
|
Font |
getDefaultFont()
Gets default font.
|
Font |
getFontFamily(String fontName)
Gets font.
|
void |
loadFontsFromFolder(String folder)
Loads all TrueType fonts from specified folder to internal collection.
|
public final Font getDefaultFont()
Gets default font.
public final void addFontSubstitution(String substituted, String substitution)
Adds font substitution.
substituted
- The substituted font name.substitution
- The substitution font name.public final void addFont(InputStream stream)
Adds the font.
stream
- The stream containing the font.public final void addFont(String file) throws FileNotFoundException
Adds the font.
file
- The path to the file containing the font.FileNotFoundException
public final void loadFontsFromFolder(String folder) throws FileNotFoundException
Loads all TrueType fonts from specified folder to internal collection.
folder
- The folder containing fonts.com.aspose.ms.System.NullReferenceException
- Parameter 'folder' is null or empty.com.aspose.ms.System.IO.DirectoryNotFoundException
- There directory specified by folder does not exist.com.aspose.ms.System.IO.InvalidDataException
- The file from folder does not contain TrueType font.FileNotFoundException
public Font getFontFamily(String fontName)
Gets font.
getFontFamily
in interface IFontsSubsystem
fontName
- The font name.Font
.