I am at present dealing with a corrupt TrueType font. Programs available to me tell me there is a problem with the maxp
table -- the maxContours
member has a value that is too large. Is there a sure-fire way to detect when a maxContours
value is too high or too low (yes that too can be a problem)? (Fonts are programs so one way to detect a font file is good is to execute them, but this is not an acceptable solution for me.)
I don't need a font library because I can't add one. I have already rolled my own TrueType font parser. What remains is to check if a given value of the above mentioned table is incorrect. I'll then add my parser and the checks to my product.
I don't have the option of rebuilding the font. I am a consumer -- I need to detect if the incoming font is corrupt or not and if it is bail out with as little work done as possible.
In case it helps -- I'm on Windows XP/Vista both 32 & 64 bit and their server versions!