Add support for woff and woff2 fonts

Change-Id: Ib44fa4eabfcd50c33eb2316b43cca83187d2370a
Reviewed-on: https://flutter-review.googlesource.com/c/third_party/freetype2/+/42000
Reviewed-by: Yegor Jbanov <yjbanov@google.com>
Commit-Queue: Harry Terkelsen <het@google.com>
Reviewed-by: Jason Simmons <jsimmons@google.com>
diff --git a/BUILD.gn b/BUILD.gn
index 8621775..ae95075 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -26,6 +26,11 @@
 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
+declare_args() {
+  # Set to true to support woff and woff2 fonts.
+  flutter_use_freetype_woff2 = false
+}
+
 config("freetype_config") {
   include_dirs = [
     "include/freetype-flutter-config",
@@ -85,4 +90,9 @@
     "//third_party/libpng",
     "//third_party/zlib",
   ]
+
+  if (flutter_use_freetype_woff2) {
+    defines += [ "FT_CONFIG_OPTION_USE_BROTLI" ]
+    deps += [ "//third_party/brotli" ]
+  }
 }