Class FontSettings

  • public final class FontSettings
    extends Object

    General imaging vector formats renderer font settings.

    • Method Detail

      • getGetSystemAlternativeFont

        public static boolean getGetSystemAlternativeFont()

        Gets a value indicating whether [get alternative font].

        Value: true if [get alternative font]; otherwise, false.
        a value indicating whether [get alternative font].
      • setGetSystemAlternativeFont

        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].
      • getDefaultFontName

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

        public static void setDefaultFontName(String fontName)
        Sets the default font name.
        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.

        A copy of the current font locations.
      • getDefaultFontsFolders

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

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

        public static void setFontsFolders(String[] folders)
        Override font folder list for folders
        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.
        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
        fontFolder - The folder contains the TrueType fonts or single font file path.
      • removeFontsFolder

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