Drop eot from supported webfont formats
IE9+ which is lowest that MediaWiki still supports is supposed to support both ttf and woff par some exceptions. This reduces uncompressed repo size almost 4000 bytes. Change-Id: If80f4ec898d86d5fd4cf873d0d86245e66da2f0b
This commit is contained in:
@@ -91,7 +91,7 @@ class FontRepoCompiler {
|
||||
$info['fontstyle'] = $font['fontstyle'];
|
||||
}
|
||||
|
||||
foreach ( [ 'ttf', 'svg', 'eot', 'woff', 'woff2' ] as $format ) {
|
||||
foreach ( [ 'ttf', 'svg', 'woff', 'woff2' ] as $format ) {
|
||||
if ( isset( $font[$format] ) ) {
|
||||
$info[$format] = $this->getFontWebPath( $fontpath, $fontdir, $font[$format] );
|
||||
}
|
||||
@@ -99,7 +99,7 @@ class FontRepoCompiler {
|
||||
|
||||
// If font formats are not explicitly defined, scan the directory.
|
||||
if ( !isset( $info['ttf'] ) ) {
|
||||
foreach ( glob( "$fontpath/*.{eot,ttf,woff,woff2,svg}", GLOB_BRACE ) as $fontfile ) {
|
||||
foreach ( glob( "$fontpath/*.{ttf,woff,woff2,svg}", GLOB_BRACE ) as $fontfile ) {
|
||||
$type = substr( $fontfile, strrpos( $fontfile, '.' ) + 1 );
|
||||
$info[$type] = $this->getFontWebPath( $fontpath, $fontdir, basename( $fontfile ) );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user