org.apache.pdfbox.preflight.font

## Class Type0FontValidator

- java.lang.Object
- - org.apache.pdfbox.preflight.font.FontValidator<Type0Container>
  - - org.apache.pdfbox.preflight.font.Type0FontValidator

    public class Type0FontValidator
    extends FontValidator<Type0Container>

### Field Summary

Fields
`protected org.apache.pdfbox.pdmodel.font.PDFont` `font`

### Fields inherited from class org.apache.pdfbox.preflight.font.FontValidator

`context, descriptorHelper, fontContainer`

### Constructor Summary

Constructors
Constructor and Description
`Type0FontValidator(PreflightContext context, org.apache.pdfbox.pdmodel.font.PDFont font)`

### Method Summary

All Methods Instance Methods Concrete Methods
`protected boolean` `checkCIDSystemInfo(org.apache.pdfbox.cos.COSDictionary cidSysInfo)` Check the content of the CIDSystemInfo dictionary.
`protected void` `checkCMapEncoding(org.apache.pdfbox.cos.COSBase encoding)`
`protected void` `checkEncoding()` Check the CMap entry.
`protected void` `checkMandatoryFields()` This methods extracts from the Font dictionary all mandatory fields.
`protected FontValidator<? extends FontContainer<org.apache.pdfbox.pdmodel.font.PDCIDFontType0>>` `createCIDType0FontValidator(org.apache.pdfbox.cos.COSDictionary fDict)` Create the validation object for CIDType0 Font
`protected FontValidator<? extends FontContainer<org.apache.pdfbox.pdmodel.font.PDCIDFontType2>>` `createCIDType2FontValidator(org.apache.pdfbox.cos.COSDictionary fDict)` Create the validation object for CIDType2 Font
`protected FontValidator<? extends FontContainer<? extends org.apache.pdfbox.pdmodel.font.PDCIDFont>>` `createDescendantValidator(org.apache.pdfbox.cos.COSDictionary cidFont)`
`protected void` `processDescendantFont()` Extract the single CIDFont from the descendant array.
`void` `validate()`

### Methods inherited from class org.apache.pdfbox.preflight.font.FontValidator

`checkToUnicode, getFontContainer`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### font

    protected final org.apache.pdfbox.pdmodel.font.PDFont font

### Constructor Detail

#### Type0FontValidator

    public Type0FontValidator(PreflightContext context,
                              org.apache.pdfbox.pdmodel.font.PDFont font)

### Method Detail

#### validate

    public void validate()
                  throws ValidationException

Specified by:
  `validate` in class `FontValidator<Type0Container>`
Throws:
  `ValidationException`

#### checkMandatoryFields

    protected void checkMandatoryFields()

This methods extracts from the Font dictionary all mandatory fields. If a mandatory field is missing, the list of ValidationError in the FontContainer is updated.

#### processDescendantFont

    protected void processDescendantFont()
                                  throws ValidationException

Extract the single CIDFont from the descendant array. Create a FontValidator for this CIDFont and launch its validation.

Throws:
  `ValidationException` - if there is an error validating the CIDFont.

#### createDescendantValidator

    protected FontValidator<? extends FontContainer<? extends org.apache.pdfbox.pdmodel.font.PDCIDFont>> createDescendantValidator(org.apache.pdfbox.cos.COSDictionary cidFont)

#### createCIDType0FontValidator

    protected FontValidator<? extends FontContainer<org.apache.pdfbox.pdmodel.font.PDCIDFontType0>> createCIDType0FontValidator(org.apache.pdfbox.cos.COSDictionary fDict)

Create the validation object for CIDType0 Font

#### createCIDType2FontValidator

    protected FontValidator<? extends FontContainer<org.apache.pdfbox.pdmodel.font.PDCIDFontType2>> createCIDType2FontValidator(org.apache.pdfbox.cos.COSDictionary fDict)

Create the validation object for CIDType2 Font

Parameters:
  `fDict` - a CIDType2 font dictionary.
Returns:
  a CIDType2 tont font validator.

#### checkEncoding

    protected void checkEncoding()

Check the CMap entry. The CMap entry must be a dictionary in a PDF/A. This entry can be a String only if the String value is Identity-H or Identity-V

Overrides:
  `checkEncoding` in class `FontValidator<Type0Container>`

#### checkCMapEncoding

    protected void checkCMapEncoding(org.apache.pdfbox.cos.COSBase encoding)

#### checkCIDSystemInfo

    protected boolean checkCIDSystemInfo(org.apache.pdfbox.cos.COSDictionary cidSysInfo)

Check the content of the CIDSystemInfo dictionary. A CIDSystemInfo dictionary must contain :

- a Name - Registry
- a Name - Ordering
- a Integer - Supplement

Parameters:
  `cidSysInfo` -
Returns:
  the validation result.