Class PdfBoxGraphics2DFontTextDrawerDefaultFonts

    • Constructor Detail

      • PdfBoxGraphics2DFontTextDrawerDefaultFonts

        public PdfBoxGraphics2DFontTextDrawerDefaultFonts()
    • Method Detail

      • mapDefaultFonts

        public static org.apache.pdfbox.pdmodel.font.Standard14Fonts.FontName mapDefaultFonts​(Font font)
        Find a PDFont for the given font object, which does not need to be embedded.
        Parameters:
        font - font for which to find a suitable default font
        Returns:
        null if no default font is found or a default font which does not need to be embedded.
      • chooseMatchingTimes

        public static org.apache.pdfbox.pdmodel.font.Standard14Fonts.FontName chooseMatchingTimes​(Font font)
        Get a PDType1Font.TIMES-variant, which matches the given font
        Parameters:
        font - Font to get the styles from
        Returns:
        a PDFont Times variant which matches the style in the given Font object.
      • chooseMatchingCourier

        public static org.apache.pdfbox.pdmodel.font.Standard14Fonts.FontName chooseMatchingCourier​(Font font)
        Get a PDType1Font.COURIER-variant, which matches the given font
        Parameters:
        font - Font to get the styles from
        Returns:
        a PDFont Courier variant which matches the style in the given Font object.
      • chooseMatchingHelvetica

        public static org.apache.pdfbox.pdmodel.font.Standard14Fonts.FontName chooseMatchingHelvetica​(Font font)
        Get a PDType1Font.HELVETICA-variant, which matches the given font
        Parameters:
        font - Font to get the styles from
        Returns:
        a PDFont Helvetica variant which matches the style in the given Font object.