MDL-46728 themes: WOFF2 fonts are not supported.

This commit is contained in:
Gareth J Barnard 2015-01-29 16:11:43 +00:00
parent 4c27f52d91
commit eb1861983a

View File

@ -57,7 +57,11 @@ if (empty($component) or $component === 'moodle' or $component === 'core') {
$component = 'core';
}
if (preg_match('/^[a-z0-9_-]+\.woff$/i', $font, $matches)) {
if (preg_match('/^[a-z0-9_-]+\.woff2$/i', $font, $matches)) {
$font = $matches[0];
$mimetype = 'application/font-woff2';
} else if (preg_match('/^[a-z0-9_-]+\.woff$/i', $font, $matches)) {
// This is the real standard!
$font = $matches[0];
$mimetype = 'application/font-woff';