Remove woff files

Bug: T318167
Change-Id: I54181a8ba084f0f1336dbe95389f046c9a987f2a
This commit is contained in:
Niklas Laxström
2024-05-04 14:32:03 +03:00
parent 17f182bb6a
commit 3367b51bbe
95 changed files with 6 additions and 101 deletions

View File

@@ -127,15 +127,15 @@ class FontRepoCompiler {
$info['fontstyle'] = $font['fontstyle'];
}
foreach ( [ 'woff', 'woff2' ] as $format ) {
foreach ( [ 'woff2' ] as $format ) {
if ( isset( $font[$format] ) ) {
$info[$format] = OutputPage::transformFilePath( $fontdir, $fontpath, $font[$format] );
}
}
// If font formats are not explicitly defined, scan the directory.
if ( !isset( $info['woff'] ) ) {
foreach ( glob( "$fontpath/*.{woff,woff2}", GLOB_BRACE ) as $fontfile ) {
if ( !isset( $info['woff2'] ) ) {
foreach ( glob( "$fontpath/*.woff2", GLOB_BRACE ) as $fontfile ) {
$type = substr( $fontfile, strrpos( $fontfile, '.' ) + 1 );
$info[$type] = OutputPage::transformFilePath( $fontdir, $fontpath, basename( $fontfile ) );
}