I’m trying to upload a custom font but I’m getting an error or it’s not recognised.
I have created a child theme and added code as the academy states. Still nothing.
Font type .otf
Code:
add_filter( ‘bricks/custom_fonts/mime_types’, function( $mime_types ) {
// Enable OTF font format for <IE9 browser support
array_unshift( $mime_types, [‘otf’ => ‘font/otf’] );
array_unshift( $mime_types, [‘eot’ => ‘font/eot’] );
add_filter( 'bricks/custom_fonts/mime_types', function( $mime_types ) {
// Enable EOT font format for <IE9 browser support
$mime_types['otf'] = 'font/otf';
$mime_types['eot'] = 'font/eot';
return $mime_types;
} );
@timmse, if someone could update the font docs at some point with the proper method. The current method returns an array like this and that’s why it doesn’t work.