public abstract class FontDescriptorHelper<T extends FontContainer> extends Object
Modifier and Type | Field and Description |
---|---|
protected PreflightContext |
context |
protected T |
fContainer |
protected PDFontLike |
font |
protected PDFontDescriptor |
fontDescriptor |
Constructor and Description |
---|
FontDescriptorHelper(PreflightContext context,
PDFontLike 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(PDFontDescriptor fontDescriptor) |
protected boolean |
fontFileNotEmbedded(PDFontDescriptor fontDescriptor) |
protected byte[] |
getMetaDataStreamAsBytes(PDMetadata metadata) |
protected boolean |
hasOnlyOneFontFile(PDFontDescriptor fontDescriptor)
Return true if the FontDescriptor has only one FontFile entry.
|
static boolean |
isSubSet(String fontName) |
protected abstract void |
processFontFile(PDFontDescriptor fontDescriptor,
PDStream fontFile) |
void |
validate() |
protected T extends FontContainer fContainer
protected PreflightContext context
protected PDFontLike font
protected PDFontDescriptor fontDescriptor
public FontDescriptorHelper(PreflightContext context, PDFontLike font, T fontContainer)
public void validate()
protected boolean checkMandatoryFields(COSDictionary fDescriptor)
public abstract PDStream extractFontFile(PDFontDescriptor fontDescriptor)
protected boolean hasOnlyOneFontFile(PDFontDescriptor fontDescriptor)
fontDescriptor
- protected boolean fontFileNotEmbedded(PDFontDescriptor fontDescriptor)
protected abstract void processFontFile(PDFontDescriptor 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)
public static boolean isSubSet(String fontName)
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.