}
@Override
protected void checkEncoding()
{
PDTrueTypeFont ttFont = (PDTrueTypeFont) font;
PDFontDescriptor fd = ttFont.getFontDescriptor();
if (fd != null)
{
/*
* only MacRomanEncoding or WinAnsiEncoding are allowed for a non symbolic font.
*/
if (fd.isNonSymbolic())
{
Encoding encodingValue = ttFont.getEncoding();
if (encodingValue == null
|| !(encodingValue instanceof MacRomanEncoding || encodingValue instanceof WinAnsiEncoding))
{
this.fontContainer.push(new ValidationError(ERROR_FONTS_ENCODING,
"The Encoding is invalid for the NonSymbolic TTF"));