Interface PDFFontSet

  • All Superinterfaces:
    java.io.Serializable
    All Known Implementing Classes:
    PDFFontSetImpl

    public interface PDFFontSet
    extends java.io.Serializable
    This interface provides access to the methods that a client can use to build a font set that is used by in the formatting of text within a PDF document. PDFFontSet objects implement the Serializable interface. The intent is that PDFFontSet objects would generally not be entirely regenerated from scratch. Instead, they would be deserialized.
    • Field Detail

      • ARABIC

        static final java.util.Locale ARABIC
      • THAI

        static final java.util.Locale THAI
      • HEBREW

        static final java.util.Locale HEBREW
    • Method Detail

      • hasRootFallback

        boolean hasRootFallback()
                         throws PDFFontException
        Returns true if there is a "final fallback" font installed in ULocale.ROOT.
        Throws:
        PDFFontException
      • addFont

        void addFont​(Font font)
              throws PDFFontException
        Add a given Font to the PDFFontSet for use in font lookup. There is an inherent priority ordering based on the order that Font objects are added with earlier added fonts having higher priority. The font shall be added for default locale available and windows platform. If clients want to specify locale and platform then they should call addFont(Font, Platform, ULocale).
        Parameters:
        font - a non-null valid Font object
        Throws:
        PDFFontException
      • addFont

        void addFont​(Font font,
                     Platform platForm,
                     ULocale locale)
              throws PDFFontException
        Add a given Font to the PDFFontSet for use in font lookup. There is an inherent priority ordering based on the order that Font objects are added with earlier added fonts having higher priority. The font shall be added for locale and platform specified by clients. If either of the platform and locale are passed as null then defaults shall be used.
        Parameters:
        font - a non-null valid Font object
        Throws:
        PDFFontException
      • addFont

        void addFont​(Font font,
                     PostscriptFontDescription[] psDescriptions,
                     CSS20FontDescription[] cssDescriptions)
              throws PDFFontException
        Add a given Font to the PDFFontSet. The provided PostScript and CSS font descriptions will be used during font lookup. Either array of descriptions can be null. If the Font's native font descriptions are also desired, both this API and other addFont variants can be called with the same Font instance. There is an inherent priority ordering based on the order that Font objects are added with earlier added fonts having higher priority.
        Throws:
        PDFFontException
      • addFont

        void addFont​(Font[] fonts)
              throws PDFFontException
        Add an array of Font objects to the PDFFontSet for use in font lookup. There is an inherent priority ordering based on the order that Font objects are added with earlier added fonts having higher priority. These fonts shall be added for default locale available and windows platform. If clients want to specify locale and platform then they should call addFont(Font[], Platform, ULocale).
        Parameters:
        fonts - a non-null array of non-null valid Font objects
        Throws:
        PDFFontException
      • addFont

        void addFont​(Font[] fonts,
                     Platform platForm,
                     ULocale locale)
              throws PDFFontException
        Add an array of Font objects to the PDFFontSet for use in font lookup. There is an inherent priority ordering based on the order that Font objects are added with earlier added fonts having higher priority. The font shall be added for locale and platform specified by clients. If either of the platform and locale are passed as null then defaults shall be used.
        Parameters:
        fonts - a non-null array of non-null valid Font objects
        Throws:
        PDFFontException
      • addFallbackFont

        void addFallbackFont​(java.util.Locale locale,
                             Font font)
                      throws PDFFontException
        Add a given Font to the PDFFontSet for use as a fallback font for the given locale. There is an inherent priority ordering based on the order that Font objects are added with earlier added fonts having higher priority.
        Parameters:
        locale - the locale for which this fallback font should be used
        font - a non-null valid Font object
        Throws:
        PDFFontException
      • addFallbackFont

        void addFallbackFont​(java.util.Locale locale,
                             Font[] fonts)
                      throws PDFFontException
        Add an array of Font objects to the PDFFontSet for use as a fallback font for the given locale. There is an inherent priority ordering based on the order that Font objects are added with earlier added fonts having higher priority.
        Parameters:
        locale - the locale for which this fallback font should be used
        fonts - a non-null array of non-null valid Font objects
        Throws:
        PDFFontException
      • setGenericFontFamilyName

        void setGenericFontFamilyName​(CSS20GenericFontFamily family,
                                      java.lang.String[] replacements)
                               throws PDFFontException
        An array of font family names to use as replacements for the generic CSS font family names. This array of font family names replaces any previously set names for the specific font family.
        Parameters:
        family -
        replacements - a non-null array of non-null valid String objects
        Throws:
        PDFFontException
        See Also:
        CSS20GenericFontFamily
      • setIgnoreFontLoadingErrors

        void setIgnoreFontLoadingErrors​(boolean ignoreFontLoadingErrors)
        Sets if any error while adding font to fontset should be ignored
        Parameters:
        ignoreFontLoadingErrors -