Add woff2 mime type (#43)
diff --git a/CHANGELOG.md b/CHANGELOG.md index 06a889b..fd8ad5c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md
@@ -1,6 +1,7 @@ # 1.0.3 * Add application/toml mimeType lookup by extension. +* Add font/woff2 lookup by extension and header bytes. * Add image/avif mimeType lookup by extension. * Add image/heic mimeType lookup by extension.
diff --git a/lib/src/default_extension_map.dart b/lib/src/default_extension_map.dart index 4135a9f..e9f5ad4 100644 --- a/lib/src/default_extension_map.dart +++ b/lib/src/default_extension_map.dart
@@ -913,6 +913,7 @@ 'wmx': 'video/x-ms-wmx', 'wmz': 'application/x-ms-wmz', 'woff': 'application/x-font-woff', + 'woff2': 'font/woff2', 'wpd': 'application/vnd.wordperfect', 'wpl': 'application/vnd.ms-wpl', 'wps': 'application/vnd.ms-works',
diff --git a/lib/src/magic_number.dart b/lib/src/magic_number.dart index 0cb5a8d..299df42 100644 --- a/lib/src/magic_number.dart +++ b/lib/src/magic_number.dart
@@ -167,5 +167,7 @@ 0xFF, 0xFF, 0xFF - ]) + ]), + + MagicNumber('font/woff2', [0x77, 0x4f, 0x46, 0x32]), ];