Font performance
-
I am only using socicon and narrowed it down in the settings to only load.
From the apache logs and the webbrowser I can see the following be loaded:
10.1.1.13 - - [16/Jan/2023:20:49:45 +0100] "GET /wp-content/plugins/social-icons-widget-by-wpzoom/assets/font/socicon.ttf?v=4.2.9 HTTP/2.0" 200 74928 ""
10.1.1.13 - - [16/Jan/2023:20:49:45 +0100] "GET /wp-content/plugins/social-icons-widget-by-wpzoom/assets/font/socicon.woff?v=4.2.9 HTTP/2.0" 200 75005 ""
10.1.1.13 - - [16/Jan/2023:20:49:46 +0100] "GET /wp-content/plugins/social-icons-widget-by-wpzoom/assets/font/socicon.ttf?v=4.1.1 HTTP/2.0" 200 74928 "…autoptimize_5d8c314738b9734664242b43f623f661.css"3 font files each 75K are loaded, serving only one font!
Triggered by:
./social-icons-widget-by-wpzoom/social-icons-widget-by-wpzoom.php:if ( wp_style_is( 'wpzoom-social-icons-socicon' ) ) {
wp_enqueue_style( 'wpzoom-social-icons-font-socicon-ttf', WPZOOM_SOCIAL_ICONS_PLUGIN_URL . 'assets/font/socicon.ttf?v=' . WPZOOM_SOCIAL_ICONS_PLUGIN_VERSION, array(), null );
wp_enqueue_style( 'wpzoom-social-icons-font-socicon-woff', WPZOOM_SOCIAL_ICONS_PLUGIN_URL . 'assets/font/socicon.woff?v=' . WPZOOM_SOCIAL_ICONS_PLUGIN_VERSION, array(), null );
}./social-icons-widget-by-wpzoom/assets/css/wpzoom-socicon.css:
@font-face {
font-family: 'wpzoom-socicon';
src: url('../font/socicon.eot?v=4.1.1');
src: url('../font/socicon.eot?v=4.1.1') format('embedded-opentype'),
url('../font/socicon.ttf?v=4.1.1') format('truetype'),
url('../font/socicon.woff?v=4.1.1') format('woff'),
url('../font/socicon.svg?v=4.1.1#socicon') format('svg');
font-weight: normal;
font-style: normal;
text-transform: initial;
font-display: block;
}The lines above in “social-icons-widget-by-wpzoom.php” could be remarked without any issues, reducing the font loading with 150KB.
The css could be improved to load the woff, instead of the ttf, by changing the order, although with no gain due to the same size. But maybe a compressed woff2 might be available.
Can you please comment/improve font loading.
- The topic ‘Font performance’ is closed to new replies.