COSDictionary fontDictionary = (COSDictionary) font.getCOSObject();
boolean areFieldsPResent = fontDictionary.containsKey(COSName.TYPE);
areFieldsPResent &= fontDictionary.containsKey(COSName.SUBTYPE);
areFieldsPResent &= fontDictionary.containsKey(COSName.BASE_FONT);
areFieldsPResent &= fontDictionary.containsKey(COSName.DESCENDANT_FONTS);
areFieldsPResent &= fontDictionary.containsKey(COSName.ENCODING);
if (!areFieldsPResent)
{
this.fontContainer.push(new ValidationError(ERROR_FONTS_DICTIONARY_INVALID,
"Some keys are missing from composite font dictionary"));