public final class FontSettings extends Object
General imaging vector formats renderer font settings.
Modifier and Type | Method and Description |
---|---|
static void |
addFontsFolder(String fontFolder)
Adds the
fontFolder into font directory list and marks it as first folder for font searching |
static String |
getDefaultFontName()
Gets the default font name.
|
static String[] |
getDefaultFontsFolders()
Gets the default fonts folders.
|
static String[] |
getFontsFolders()
Gets a copy of the array that contains the list of folders where Aspose.Imaging looks for TrueType fonts.
|
static boolean |
getGetSystemAlternativeFont()
Gets a value indicating whether [get alternative font].
|
static void |
removeFontsFolder(String folder)
Removes
folder from folder list |
static void |
reset()
Resets the fonts folder and default font name to the system default.
|
static void |
setDefaultFontName(String fontName)
Sets the default font name.
|
static void |
setFontsFolder(String folder)
Override font folder list for
folder |
static void |
setFontsFolders(String[] folders)
Override font folder list for
folders |
static void |
setFontsFolders(String[] folders,
boolean recursive)
Sets the folders where TrueType fonts are loaded from and clears all loaded fonts.
|
static void |
setGetSystemAlternativeFont(boolean value)
Sets a value indicating whether [get alternative font].
|
static void |
updateFonts()
Updates fonts cache for PSD files that contain text layers.
|
public static boolean getGetSystemAlternativeFont()
Gets a value indicating whether [get alternative font].
Value:true
if [get alternative font]; otherwise, false
.public static void setGetSystemAlternativeFont(boolean value)
Sets a value indicating whether [get alternative font].
Value:true
if [get alternative font]; otherwise, false
.value
- a value indicating whether [get alternative font].public static String getDefaultFontName()
public static void setDefaultFontName(String fontName)
fontName
- The default name of the font.public static String[] getFontsFolders()
Gets a copy of the array that contains the list of folders where Aspose.Imaging looks for TrueType fonts.
The returned value is a copy of the data that Aspose.Imaging uses. If you change the entries in the returned array,
it will have no effect on document rendering. To specify new font locations use the setFontsFolders
method.
public static String[] getDefaultFontsFolders()
public static void setFontsFolder(String folder)
folder
folder
- Folder with TrueType fonts.public static void setFontsFolders(String[] folders)
folders
folders
- Array of folderpublic static void setFontsFolders(String[] folders, boolean recursive)
folders
- The fonts folders.recursive
- if set to true
[recursive].public static void reset()
public static void updateFonts()
Updates fonts cache for PSD files that contain text layers. This method guarantees that fonts from folder fontsFolder using method FontSettings.setFontsFolder(fontsFolder) or after reset fonts using FontSettings.reset() will be taken into consideration when processing PSD files. Please use this method each time when FontSettings.setFontsFolder(fontsFolder) or FontSettings.reset() called for PSD images. Without calling this Method there is no guarantee that fonts will be updated.
public static void addFontsFolder(String fontFolder)
fontFolder
into font directory list and marks it as first folder for font searchingfontFolder
- The folder contains the TrueType fonts or single font file path.public static void removeFontsFolder(String folder)
folder
from folder listfolder
- The folder to remove