Validate font hinting code in OpenType CFF table. 

The validation will fail if one of the following conditions is met: 
1. The code uses more than 48 values of argument stack. 
2. The code uses deeply nested subroutine calls (more than 10 levels.) 
3. The code passes invalid number of operands to an operator. 
4. The code calls an undefined global or local subroutine. 
5. The code uses one of the following operators that are unlikely used in an ordinary fonts, and could be dangerous: random, put, get, index, roll. 

Review: http://codereview.chromium.org/3023041

BUG=51070
TEST=http://code.google.com/p/ots/wiki/HowToTestOts (Verified that the modified OTS rejects all malformed fonts, and does not reject all non-malformed fonts. I tested ~3400 TrueType and ~450 OpenType fonts.) 



git-svn-id: http://ots.googlecode.com/svn/trunk@34 a4e77c2c-9104-11de-800e-5b313e0d2bf3
7 files changed
tree: ffe044bde55a5711d7525bb9059fcc081749106a
  1. include/
  2. src/
  3. test/
  4. tools/
  5. .ignores
  6. INSTALL
  7. LICENSE
  8. ots.gyp
  9. README