[OTS] Integrate WOFF 2.0 algorithm into OTS
Add woff2.h and woff2.cc from the WOFF 2.0 reference implementation
(https://code.google.com/p/font-compression-reference/).
WOFF2 support is disabled by default and is enabled by ots::EnableWOFF2().
Patch originally by bashi@chromium.org.
BUG=122603
R=yusukes@chromium.org
Review URL: https://codereview.chromium.org/13918002
git-svn-id: http://ots.googlecode.com/svn/trunk@100 a4e77c2c-9104-11de-800e-5b313e0d2bf3
diff --git a/src/gsub.cc b/src/gsub.cc
index b38ebcb..02a5b5c 100644
--- a/src/gsub.cc
+++ b/src/gsub.cc
@@ -63,9 +63,8 @@
ParseReverseChainingContextSingleSubstitution}
};
-// TODO(bashi): Port Chromium's arraysize macro and use it instead of sizeof().
const ots::LookupSubtableParser kGsubLookupSubtableParser = {
- sizeof(kGsubTypeParsers) / sizeof(kGsubTypeParsers[0]),
+ arraysize(kGsubTypeParsers),
GSUB_TYPE_EXTENSION_SUBSTITUTION, kGsubTypeParsers
};