Interface PSNameResolver

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

    public interface PSNameResolver
    extends java.io.Serializable
    This interface provides access to the methods that a client can use to build a font set that is used to resolve Postscript font names into actual Font objects.

    Concurrency

    All classes that implement this interface are in general not guaranteed to be threadsafe. Specific implementations may offer tighter guarantees.
    • Method Detail

      • setResolutionPriority

        FontResolutionPriority setResolutionPriority​(FontResolutionPriority priority)
        Set the resolution mechanism that the PSNameResolver should use to decide which font should be chosen when two fonts have the same Postscript name.

        FontResolutionPriority.INTELLIGENT_FIRST specifies that an "intelligent" determination is made about the fonts and the "better" of the two font is chosen. If the "intelligent" resolver can make no distinction between the fonts then the first font to have been added first is chosen.

        FontResolutionPriority.INTELLIGENT_LAST specifies that an "intelligent" determination is made about the fonts and the "better" of the two font is chosen. If the "intelligent" resolver can make no distinction between the fonts then the first font to have been added last is chosen.

        FontResolutionPriority.FIRST specifies the first font added to the font set that matches the Postscript attributes is chosen.

        FontResolutionPriority.LAST specifies the last font added to the font set that matches the Postscript attributes is chosen.

        Parameters:
        priority - The resolution mechanism to use
        Returns:
        The old resolution priority setting.
      • isEmpty

        boolean isEmpty()
        Returns:
        true if the font set is empty (has no fonts); false otherwise
      • findFont

        Font findFont​(PostscriptFontDescription psDesc)
        Find a Font that matches the provided postscript description. No analysis (e.g., removal of a CMap extension) is done by this function.
        Parameters:
        psDesc - the postscript description of the font
        Returns:
        the Font.