com.aspose.page

Class ExternalFontCache



  • public class ExternalFontCache
    extends Object

    Use this class to obtain font encapsulation in a form that is accepted by Device.

    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      static com.aspose.foundation.drawing.DrFont fetchDrFont(String familyName, float sizePoints, int style)
      Fetches DrFont by font family name, size and style.
      com.aspose.foundation.drawing.DrFont fetchDrFont(String familyName, float sizePoints, int style, int fontCapitals)
      Fetches DrFont by font family name, size, style and font capitals.
      com.aspose.foundation.drawing.DrFont fetchDrFont(String familyName, float sizePoints, int style, String altFamilyName)
      Fetches DrFont by font family name, size, style and alternative font family name.
      com.aspose.foundation.drawing.DrFont fetchDrFont(String familyName, float sizePoints, int style, String altFamilyName, int fontCapitals)
      Fetches DrFont by font family name, size, style, font capitals and alternative font family name.
      com.aspose.foundation.truetype.TTFont fetchTTFont(String familyName, int style, String altFamilyName)
      Fetches TTFont by font family name, style and alternative font family name.
      static void setAdditionalFontsFolders(String[] additionalFontFolders)
      Specifies additional fonts folders.
    • Constructor Detail

      • ExternalFontCache

        public ExternalFontCache()
    • Method Detail

      • setAdditionalFontsFolders

        public static void setAdditionalFontsFolders(String[] additionalFontFolders)

        Specifies additional fonts folders. Fonts folders that are used by OS are used by ExternalFont Cache by default. There are no needs to define them,

        Parameters:
        additionalFontFolders - An array of additional fonts folders.
      • fetchDrFont

        public static com.aspose.foundation.drawing.DrFont fetchDrFont(String familyName,
                                                                       float sizePoints,
                                                                       int style)

        Fetches DrFont by font family name, size and style.

        Parameters:
        familyName - Font family name.
        sizePoints - Font size in points (one point is 1/72 of inch).
        style - Font style.
        Returns:
        DrFont.
      • fetchDrFont

        public com.aspose.foundation.drawing.DrFont fetchDrFont(String familyName,
                                                                float sizePoints,
                                                                int style,
                                                                int fontCapitals)

        Fetches DrFont by font family name, size, style and font capitals.

        Parameters:
        familyName - Font family name.
        sizePoints - Font size in points (one point is 1/72 of inch).
        style - Font style.
        fontCapitals - Font capitals.
        Returns:
        DrFont.
      • fetchDrFont

        public com.aspose.foundation.drawing.DrFont fetchDrFont(String familyName,
                                                                float sizePoints,
                                                                int style,
                                                                String altFamilyName)

        Fetches DrFont by font family name, size, style and alternative font family name.

        Parameters:
        familyName - Font family name.
        sizePoints - Font size in points (one point is 1/72 of inch).
        style - Font style.
        altFamilyName - Alternative font family name.
        Returns:
        DrFont.
      • fetchDrFont

        public com.aspose.foundation.drawing.DrFont fetchDrFont(String familyName,
                                                                float sizePoints,
                                                                int style,
                                                                String altFamilyName,
                                                                int fontCapitals)

        Fetches DrFont by font family name, size, style, font capitals and alternative font family name.

        Parameters:
        familyName - Font family name.
        sizePoints - Font size in points (one point is 1/72 of inch).
        style - Font style.
        altFamilyName - Alternative font family name.
        fontCapitals - Font capitals.
        Returns:
        DrFont.
      • fetchTTFont

        public com.aspose.foundation.truetype.TTFont fetchTTFont(String familyName,
                                                                 int style,
                                                                 String altFamilyName)

        Fetches TTFont by font family name, style and alternative font family name.

        Parameters:
        familyName - Font family name.
        style - Font style.
        altFamilyName - Alternative font family name.
        Returns:
        TTFont.