public abstract class FontContainer extends Object
Modifier and Type | Field and Description |
---|---|
protected Map<Integer,GlyphDetail> |
computedCid
Link CID to an Object that contain information about the Glyph state (Valid or no)
|
protected boolean |
embeddedFont
Boolean used to known if the font is embedded.
|
protected List<ValidationResult.ValidationError> |
errorBuffer
List of validation errors that occur during the font validation.
|
protected boolean |
errorsAleadyMerged |
protected PDFont |
font |
Constructor and Description |
---|
FontContainer(PDFont font) |
Modifier and Type | Method and Description |
---|---|
void |
checkGlyphWith(int cid) |
protected void |
checkWidthsConsistency(int cid,
float expectedWidth,
float foundWidth)
Test if both width are consistent.
|
boolean |
errorsAleadyMerged() |
List<ValidationResult.ValidationError> |
getAllErrors() |
protected abstract float |
getFontProgramWidth(int cid)
Extract the Glyph width for the given CID.
|
protected boolean |
isAlreadyComputedCid(int cid)
Check if the given CID is already computed
|
boolean |
isEmbeddedFont() |
boolean |
isValid() |
void |
markCIDAsInvalid(int cid,
GlyphException gex) |
void |
markCIDAsValid(int cid) |
void |
notEmbedded() |
void |
push(List<ValidationResult.ValidationError> errors) |
void |
push(ValidationResult.ValidationError error) |
void |
setErrorsAleadyMerged(boolean errorsAleadyMerged) |
protected List<ValidationResult.ValidationError> errorBuffer
protected boolean embeddedFont
protected Map<Integer,GlyphDetail> computedCid
protected boolean errorsAleadyMerged
protected PDFont font
public FontContainer(PDFont font)
public void push(ValidationResult.ValidationError error)
public void push(List<ValidationResult.ValidationError> errors)
public List<ValidationResult.ValidationError> getAllErrors()
public boolean isValid()
public boolean errorsAleadyMerged()
public void setErrorsAleadyMerged(boolean errorsAleadyMerged)
public boolean isEmbeddedFont()
public void notEmbedded()
public void checkGlyphWith(int cid) throws GlyphException
cid
- GlyphException
protected boolean isAlreadyComputedCid(int cid) throws GlyphException
cid
- the CID to checkGlyphException
- if the CID has previously been marked as invalid // TODO useful ??protected abstract float getFontProgramWidth(int cid)
cid
- protected void checkWidthsConsistency(int cid, float expectedWidth, float foundWidth) throws GlyphException
cid
- expectedWidth
- foundWidth
- the glyph width found in the font program, a negative value if the CID is missing from the font.GlyphException
public final void markCIDAsValid(int cid)
public final void markCIDAsInvalid(int cid, GlyphException gex)
Copyright © 2002–2015 The Apache Software Foundation. All rights reserved.