*/
protected void checkWidthsConsistency(int cid, float expectedWidth, float foundWidth) throws GlyphException
{
if (foundWidth < 0)
{
GlyphException e = new GlyphException(PreflightConstants.ERROR_FONTS_GLYPH_MISSING, cid, "The character \""
+ cid + "\" in the font program \"" + this.font.getBaseFont()
+ "\"is missing from the Charater Encoding.");
markCIDAsInvalid(cid, e);
throw e;
}
// consistent is defined to be a difference of no more than 1/1000 unit.
if (Math.abs(foundWidth - expectedWidth) > 1)
{
GlyphException e = new GlyphException(PreflightConstants.ERROR_FONTS_METRICS, cid,
"Width of the character \"" + cid + "\" in the font program \"" + this.font.getBaseFont()
+ "\"is inconsistent with the width in the PDF dictionary.");
markCIDAsInvalid(cid, e);
throw e;
}