Class FontDescriptorHelper<T extends FontContainer>

java.lang.Object
org.apache.pdfbox.preflight.font.descriptor.FontDescriptorHelper<T>
Direct Known Subclasses:
CIDType0DescriptorHelper, CIDType2DescriptorHelper, TrueTypeDescriptorHelper, Type1DescriptorHelper

public abstract class FontDescriptorHelper<T extends FontContainer> extends Object
  • Field Details

  • Constructor Details

  • Method Details

    • validate

      public void validate()
    • checkMandatoryFields

      protected boolean checkMandatoryFields(COSDictionary fDescriptor)
    • extractFontFile

      public abstract PDStream extractFontFile(PDFontDescriptor fontDescriptor)
    • hasOnlyOneFontFile

      protected boolean hasOnlyOneFontFile(PDFontDescriptor fontDescriptor)
      Return true if the FontDescriptor has only one FontFile entry.
      Parameters:
      fontDescriptor -
      Returns:
      true if the FontDescriptor has only one FontFile entry.
    • fontFileNotEmbedded

      protected boolean fontFileNotEmbedded(PDFontDescriptor fontDescriptor)
    • processFontFile

      protected abstract void processFontFile(PDFontDescriptor fontDescriptor, PDStream fontFile)
    • checkFontFileMetaData

      protected void checkFontFileMetaData(PDFontDescriptor fontDescriptor, PDStream fontFile)
      Type0, Type1 and TrueType FontValidator call this method to check the FontFile meta data.
      Parameters:
      fontDescriptor - The FontDescriptor which contains the FontFile stream
      fontFile - The font file stream to check
    • getMetaDataStreamAsBytes

      protected final byte[] getMetaDataStreamAsBytes(PDMetadata metadata)
    • isSubSet

      public static boolean isSubSet(String fontName)