public abstract class FontDescriptorHelper<T extends FontContainer> extends Object
Modifier and Type | Field and Description |
---|---|
protected PreflightContext |
context |
protected T |
fContainer |
protected PDFont |
font |
protected PDFontDescriptorDictionary |
fontDescriptor |
Constructor and Description |
---|
FontDescriptorHelper(PreflightContext context,
PDFont font,
T fontContainer) |
Modifier and Type | Method and Description |
---|---|
protected void |
checkFontFileMetaData(PDFontDescriptor fontDescriptor,
PDStream fontFile)
Type0, Type1 and TrueType FontValidator call this method to check the FontFile meta data.
|
protected boolean |
checkMandatoryFields(COSDictionary fDescriptor) |
abstract PDStream |
extractFontFile(PDFontDescriptorDictionary fontDescriptor) |
protected boolean |
fontFileNotEmbedded(PDFontDescriptorDictionary fontDescriptor) |
protected byte[] |
getMetaDataStreamAsBytes(PDMetadata metadata) |
protected boolean |
hasOnlyOneFontFile(PDFontDescriptorDictionary fontDescriptor)
Return true if the FontDescriptor has only one FontFile entry.
|
protected abstract void |
processFontFile(PDFontDescriptorDictionary fontDescriptor,
PDStream fontFile) |
void |
validate() |
protected T extends FontContainer fContainer
protected PreflightContext context
protected PDFont font
protected PDFontDescriptorDictionary fontDescriptor
public FontDescriptorHelper(PreflightContext context, PDFont font, T fontContainer)
public void validate()
protected boolean checkMandatoryFields(COSDictionary fDescriptor)
public abstract PDStream extractFontFile(PDFontDescriptorDictionary fontDescriptor)
protected boolean hasOnlyOneFontFile(PDFontDescriptorDictionary fontDescriptor)
fontDescriptor
- protected boolean fontFileNotEmbedded(PDFontDescriptorDictionary fontDescriptor)
protected abstract void processFontFile(PDFontDescriptorDictionary fontDescriptor, PDStream fontFile)
protected void checkFontFileMetaData(PDFontDescriptor fontDescriptor, PDStream fontFile)
fontDescriptor
- The FontDescriptor which contains the FontFile streamfontFile
- The font file stream to checkprotected final byte[] getMetaDataStreamAsBytes(PDMetadata metadata)
Copyright © 2002–2015 The Apache Software Foundation. All rights reserved.