Font Optimization


Hi Guys,

I am using geomanist font font for my child theme I included it in style.less as

@font-face {
    font-family: 'geomanistregular';
    src: url('../fonts/geomanist-regular-webfont.eot');
    src: url('../fonts/geomanist-regular-webfont.eot?#iefix') format('embedded-opentype'),
         url('../fonts/geomanist-regular-webfont.woff2') format('woff2'),
         url('../fonts/geomanist-regular-webfont.woff') format('woff'),
         url('../fonts/geomanist-regular-webfont.ttf') format('truetype'),
         url('../fonts/geomanist-regular-webfont.svg#geomanistregular') format('svg');
    font-weight: normal;
    font-style: normal;
}

It is taking much much time to load and page speed is badly affected by this. How can I optimize fonts? Is there any other way to include the fonts in child theme?

Thanks


Hi Usman,

I can't see anything wrong with the code snippet your provided, what size are your fonts? Could you perhaps share you font files so that I can do some testing on my side?

Thanks,



Hi Usman,

I see on your screenshot that you font size was 27.8kb which is pretty big. When looking at your site today, it is down to 4.9kb which seems ok. I guess you manage to resolve your issue right?

Happy coding,

Write a reply

Login or register to write a reply, it's free!