Interface OutputProfiler.FontAction

  • All Known Implementing Classes:
    Enclosing class:

    public static interface OutputProfiler.FontAction
    An action that can be set on an OutputProfiler to replace one font with another in the PDF. Typically it's used to replace unembedded fonts with embedded ones, but other possibilities exist. The position of each glyph will not be altered on the page, so the metrics for the original and replacement font should be substantially the same.
    • Method Detail

      • getFont

        PDFFont getFont​(OutputProfiler profiler,
                        String name,
                        boolean embedded,
                        PDFFont font)
        Returns the font to use instead of the specified font, or null to make no changes
        profiler - the OutputProfiler this action is being run on
        name - the font name
        embedded - whether the font is embedded in the PDF - typically embedded fonts should be left unchanged.
        font - the font that is being replaced. Note this structure is unlikely to support the full PDFFont API, and the object cannot be reused elsewhere.