Hi team,
I’ve replaced all instances of legacy icon fonts with the new SVG versions, but the icon font file (/entypo-fontello-enfold/entypo-fontello-enfold.woff2) still loads – what is the reason for this and is there a way to prevent this?
Please see private
Thanks.
Hi,
When I check on my test site adding this to the top of my child theme, or parent right after if( ! defined( ‘ABSPATH’ ) ) { exit; } prevents entypo-fontello-enfold.woff2 from loading:
function avf_custom_font_display( $font_display, $font_name )
{
if( 'entypo-fontello' == $font_name )
{
return 'swap';
}
return $font_display;
}
add_filter( 'avf_font_display', 'avf_custom_font_display', 10, 2 );
If you still have some css calling the entypo-fontello font, such as the submenu-indicator, you will need to override the css like this:
.html_av-submenu-hidden .av-submenu-indicator:before {
content: ">";
font-family: svg_entypo-fontello;
}
Best regards,
Mike
