Class PDFFontSetImpl

java.lang.Object
com.adobe.internal.pdftoolkit.core.fontset.impl.PDFFontSetImpl
All Implemented Interfaces:
PDFFontSet, Serializable

public class PDFFontSetImpl extends Object implements PDFFontSet
Provides access to an aggregated font set, including CSS20FontSet, PSFontSet, and FallbackFontSet.
See Also:
  • Constructor Details

  • Method Details

    • hasRootFallback

      public boolean hasRootFallback() throws PDFFontException
      Description copied from interface: PDFFontSet
      Returns true if there is a "final fallback" font installed in ULocale.ROOT.
      Specified by:
      hasRootFallback in interface PDFFontSet
      Throws:
      PDFFontException
    • addFont

      public void addFont(Font font, Platform platForm, ULocale locale) throws PDFFontException
      Description copied from interface: PDFFontSet
      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.
      Specified by:
      addFont in interface PDFFontSet
      Parameters:
      font - a non-null valid Font object
      Throws:
      PDFFontException
    • addFont

      public void addFont(Font font, PostscriptFontDescription[] psDescriptions, CSS20FontDescription[] cssDescriptions) throws PDFFontException
      Description copied from interface: PDFFontSet
      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.
      Specified by:
      addFont in interface PDFFontSet
      Throws:
      PDFFontException
    • addFont

      public void addFont(Font[] fonts, Platform platForm, ULocale locale) throws PDFFontException
      Description copied from interface: PDFFontSet
      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.
      Specified by:
      addFont in interface PDFFontSet
      Parameters:
      fonts - a non-null array of non-null valid Font objects
      Throws:
      PDFFontException
    • addFallbackFont

      public void addFallbackFont(Locale locale, Font font) throws PDFFontException
      Description copied from interface: PDFFontSet
      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.
      Specified by:
      addFallbackFont in interface PDFFontSet
      Parameters:
      locale - the locale for which this fallback font should be used
      font - a non-null valid Font object
      Throws:
      PDFFontException
    • addFallbackFont

      public void addFallbackFont(Locale locale, Font[] fonts) throws PDFFontException
      Description copied from interface: PDFFontSet
      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.
      Specified by:
      addFallbackFont in interface PDFFontSet
      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

      public void setGenericFontFamilyName(CSS20GenericFontFamily family, String[] replacements) throws PDFFontException
      Description copied from interface: PDFFontSet
      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.
      Specified by:
      setGenericFontFamilyName in interface PDFFontSet
      Parameters:
      family -
      replacements - a non-null array of non-null valid String objects
      Throws:
      PDFFontException
      See Also:
    • getCSS20FontSet

      public CSS20FontSet getCSS20FontSet() throws PDFFontException
      Get the CSS20 fonts.
      Returns:
      an object that provides access to a font set.
      Throws:
      PDFFontException
    • getPSFontSet

      public PSNameResolver getPSFontSet() throws PDFFontException
      Get the PS fonts.
      Returns:
      an object that provides access to a font set.
      Throws:
      PDFFontException
    • getFallbackFontSet

      public FallbackFontSet getFallbackFontSet() throws PDFFontException
      Get the fallback fonts.
      Specified by:
      getFallbackFontSet in interface PDFFontSet
      Returns:
      an object that provides access to a font set.
      Throws:
      PDFFontException
    • getPSFont

      public Font getPSFont(PostscriptFontDescription fontDescription, Locale locale, boolean substitute) throws PDFFontException
      Get the PS fonts.
      Parameters:
      substitute - If true and the exact fontDescription is not found, a fallback font can be returned.
      Returns:
      a font matching the description provided or a fallback appropriate for the locale.
      Throws:
      PDFFontException
    • getFallbackFont

      public Font getFallbackFont(Locale locale)
      Gets the preferred fallback font for locale supplied
      Parameters:
      locale - locale
      Returns:
      fallback font
    • getPSFont

      public Font getPSFont(String fontName, Locale locale, boolean substitute) throws PDFFontException
      Throws:
      PDFFontException
    • setResolutionPriority

      public void setResolutionPriority(FontResolutionPriority priority)
    • toString

      public String toString()
      A debugging string containing information about the contents of the PDFFontSetImpl instance.
      Overrides:
      toString in class Object
    • addFont

      public void addFont(Font font) throws PDFFontException
      Description copied from interface: PDFFontSet
      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 PDFFontSet.addFont(Font, Platform, ULocale).
      Specified by:
      addFont in interface PDFFontSet
      Parameters:
      font - a non-null valid Font object
      Throws:
      PDFFontException
    • addFont

      public void addFont(Font[] fonts) throws PDFFontException
      Description copied from interface: PDFFontSet
      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 PDFFontSet.addFont(Font[], Platform, ULocale).
      Specified by:
      addFont in interface PDFFontSet
      Parameters:
      fonts - a non-null array of non-null valid Font objects
      Throws:
      PDFFontException
    • setIgnoreFontLoadingErrors

      public void setIgnoreFontLoadingErrors(boolean ignoreFontLoadingErrors)
      Description copied from interface: PDFFontSet
      Sets if any error while adding font to fontset should be ignored
      Specified by:
      setIgnoreFontLoadingErrors in interface PDFFontSet
      Parameters:
      ignoreFontLoadingErrors -