Packages

 

com.aspose.imaging

Interfaces

Classes

Exceptions

com.aspose.imaging

Class FontSettings



  • public final class FontSettings
    extends Object

    General imaging vector formats renderer font settings.

    • Method Detail

      • getDefaultFontName

        public static String getDefaultFontName()
        Gets the default font name.
        Returns:
        default font's name
      • setDefaultFontName

        public static void setDefaultFontName(String fontName)
        Sets the default font name.
        Parameters:
        fontName - The default name of the font.
      • getFontsFolders

        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.

        Returns:
        A copy of the current font locations.
      • getDefaultFontsFolders

        public static String[] getDefaultFontsFolders()
        Gets the default fonts folders.
        Returns:
        Returns system folder
      • setFontsFolder

        public static void setFontsFolder(String folder)
        Override font folder list for folder
        Parameters:
        folder - Folder with TrueType fonts.
      • setFontsFolders

        public static void setFontsFolders(String[] folders)
        Override font folder list for folders
        Parameters:
        folders - Array of folder
      • setFontsFolders

        public static void setFontsFolders(String[] folders,
                                           boolean recursive)
        Sets the folders where TrueType fonts are loaded from and clears all loaded fonts. There are no checks performed on the fonts folders.
        Parameters:
        folders - The fonts folders.
        recursive - if set to true [recursive].
      • reset

        public static void reset()
        Resets the fonts folder and default font name to the system default.
      • updateFonts

        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.

      • addFontsFolder

        public static void addFontsFolder(String fontFolder)
        Adds the fontFolder into font directory list and marks it as first folder for font searching
        Parameters:
        fontFolder - The folder contains the TrueType fonts or single font file path.
      • removeFontsFolder

        public static void removeFontsFolder(String folder)
        Removes folder from folder list
        Parameters:
        folder - The folder to remove