Bug 1064737 pt 1 - Enable WOFF2 support in OTS. r=jdaggett
--- a/gfx/ots/include/opentype-sanitiser.h
+++ b/gfx/ots/include/opentype-sanitiser.h
@@ -236,13 +236,13 @@ class OTS_API OTSContext {
virtual TableAction GetTableAction(uint32_t tag) { return ots::TABLE_ACTION_DEFAULT; }
};
// Force to disable debug output even when the library is compiled with
// -DOTS_DEBUG.
void DisableDebugOutput();
// Enable WOFF2 support(experimental).
-void EnableWOFF2();
+void OTS_API EnableWOFF2();
} // namespace ots
#endif // OPENTYPE_SANITISER_H_
--- a/gfx/ots/src/moz.build
+++ b/gfx/ots/src/moz.build
@@ -39,16 +39,17 @@ UNIFIED_SOURCES += [
'metrics.cc',
'name.cc',
'os2.cc',
'ots.cc',
'post.cc',
'prep.cc',
'vhea.cc',
'vmtx.cc',
+ 'woff2.cc',
]
MSVC_ENABLE_PGO = True
if CONFIG['GKMEDIAS_SHARED_LIBRARY']:
NO_VISIBILITY_FLAGS = True
FINAL_LIBRARY = 'gkmedias'
@@ -56,10 +57,11 @@ FINAL_LIBRARY = 'gkmedias'
DEFINES['PACKAGE_VERSION'] = '"moz"'
DEFINES['PACKAGE_BUGREPORT'] = '"http://bugzilla.mozilla.org/"'
DEFINES['NOMINMAX'] = True
if CONFIG['OS_TARGET'] == 'WINNT':
DEFINES['OTS_DLL'] = True
DEFINES['OTS_DLL_EXPORTS'] = True
-# Disable WOFF2 support.
-DEFINES['OTS_DISABLE_WOFF2'] = True;
+USE_LIBS += [
+ 'brotli',
+]
--- a/gfx/ots/src/woff2.cc
+++ b/gfx/ots/src/woff2.cc
@@ -6,17 +6,17 @@
// Condensed file format.
#include <cassert>
#include <cstdlib>
#include <vector>
#include <zlib.h>
-#include "third_party/brotli/src/brotli/dec/decode.h"
+#include "decode.h"
#include "opentype-sanitiser.h"
#include "ots-memory-stream.h"
#include "ots.h"
#include "woff2.h"
namespace {