Class FontDescriptorHelper<T extends FontContainer>
java.lang.Object
org.apache.pdfbox.preflight.font.descriptor.FontDescriptorHelper<T>
- Direct Known Subclasses:
CIDType0DescriptorHelper,CIDType2DescriptorHelper,TrueTypeDescriptorHelper,Type1DescriptorHelper
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected PreflightContextprotected Tprotected PDFontLikeprotected PDFontDescriptor -
Constructor Summary
ConstructorsConstructorDescriptionFontDescriptorHelper(PreflightContext context, PDFontLike font, T fontContainer) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcheckFontFileMetaData(PDFontDescriptor fontDescriptor, PDStream fontFile) Type0, Type1 and TrueType FontValidator call this method to check the FontFile meta data.protected booleancheckMandatoryFields(COSDictionary fDescriptor) abstract PDStreamextractFontFile(PDFontDescriptor fontDescriptor) protected booleanfontFileNotEmbedded(PDFontDescriptor fontDescriptor) protected final byte[]getMetaDataStreamAsBytes(PDMetadata metadata) protected booleanhasOnlyOneFontFile(PDFontDescriptor fontDescriptor) Return true if the FontDescriptor has only one FontFile entry.static booleanprotected abstract voidprocessFontFile(PDFontDescriptor fontDescriptor, PDStream fontFile) voidvalidate()
-
Field Details
-
fContainer
-
context
-
font
-
fontDescriptor
-
MANDATORYFIELDS
-
-
Constructor Details
-
FontDescriptorHelper
-
-
Method Details
-
validate
public void validate() -
checkMandatoryFields
-
extractFontFile
-
hasOnlyOneFontFile
Return true if the FontDescriptor has only one FontFile entry.- Parameters:
fontDescriptor-- Returns:
- true if the FontDescriptor has only one FontFile entry.
-
fontFileNotEmbedded
-
processFontFile
-
checkFontFileMetaData
Type0, Type1 and TrueType FontValidator call this method to check the FontFile meta data.- Parameters:
fontDescriptor- The FontDescriptor which contains the FontFile streamfontFile- The font file stream to check
-
getMetaDataStreamAsBytes
-
isSubSet
-