简体   繁体   中英

Page has a weird font glitch on refresh

So I've built a HTML page but I'm getting this weird bug where when I refresh the page, for a split second after refresh I can see the basic font, and afterwards it changes to the one I've applied from Google fonts.

I've checked my code a thousand times and I've no idea what's happening, this is the first time I'm seeing this. It is kinda annoying because it very visible and my elements even change positions a bit, because of the font/size.

Do you have any idea what could be causing this?

a quick search made me find this article: https://medium.com/clio-calliope/making-google-fonts-faster-aadf3c02a36d

you should download your fonts and host them yourself so it renders faster. having google host it for you only makes it slower to load (could be many factors why it takes long to load, maybe its your internet, maybe because there is a lot of text on the page, maybe both.) which causes you to see the regular font for a couple seconds.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM