Class PdfBoxRawPDFontMetrics

  • All Implemented Interfaces:
    FSCacheValue

    public class PdfBoxRawPDFontMetrics
    extends java.lang.Object
    implements FSCacheValue
    • Field Detail

      • _ascent

        public final float _ascent
      • _descent

        public final float _descent
      • _strikethroughOffset

        public final float _strikethroughOffset
      • _strikethroughThickness

        public final float _strikethroughThickness
      • _underlinePosition

        public final float _underlinePosition
      • _underlineThickness

        public final float _underlineThickness
    • Constructor Detail

      • PdfBoxRawPDFontMetrics

        public PdfBoxRawPDFontMetrics​(float ascent,
                                      float descent,
                                      float strikethroughOffset,
                                      float strikethroughThickness,
                                      float underlinePosition,
                                      float underlineThickness)
    • Method Detail

      • fromPdfBox

        public static PdfBoxRawPDFontMetrics fromPdfBox​(org.apache.pdfbox.pdmodel.font.PDFont font,
                                                        org.apache.pdfbox.pdmodel.font.PDFontDescriptor descriptor)
                                                 throws java.io.IOException
        Throws:
        java.io.IOException
      • weight

        public int weight()
        Specified by:
        weight in interface FSCacheValue
        Returns:
        the (very) approximate weight of a cache value in bytes if known or -1 otherwise.