Addressed Tavis's comments in http://codereview.chromium.org/3023041/.
- Modified 4-bytes 16.16 Fixed-point number decoder in ReadNextNumberFromType2CharString().
- Fixed off-by-one error in ExecuteType2CharStringOperator().
- Fixed checks of 'div' and 'endchar' operators. They were not strict enough.
- Wrote ~1600 lines of test to verify if the modification above is valid.
- Moved Type2CharStringOperator enum definition from cff_type2_charstriung.cc tocff_type2_charstriung.h to write the unit tests.
Review: http://codereview.chromium.org/3027049
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.)
TEST=ran cff_type2_charstring_test.
git-svn-id: http://ots.googlecode.com/svn/trunk@35 a4e77c2c-9104-11de-800e-5b313e0d2bf3
4 files changed