- This topic has 37 replies, 4 voices, and was last updated 3 years, 4 months ago by
David.
-
AuthorPosts
-
April 7, 2022 at 4:10 pm #2181547
Mary Pearson
I am rebuilding a website for a friend at https://4.bestwebsites.ca/. The font she is choosing to use for Headings is “Breathing”. It is NOT a google font. The font loads first with a default font, and then it switches to “Breathing”. There is a delay in loading and then in switching. Can you please tell me what I’m doing wrong.
I believe that I have added the font versions correctly as per your documentation, with the following CSS:
@font-face { font-family: "Breathing"; font-style: normal; font-weight: 400; src: url("https://4.bestwebsites.ca/wp-content/uploads/Breathing.ttf") format("ttf"); src: url("https://4.bestwebsites.ca/wp-content/uploads/breathing-webfont.woff") format("woff"), src: url("https://4.bestwebsites.ca/wp-content/uploads/breathing-webfont.woff2") format("woff2"), src: url("https://4.bestwebsites.ca/wp-content/uploads/Breathing.otf") format("otf"); src: url("https://4.bestwebsites.ca/wp-content/uploads/Breathing.eot") format("eot"); }
I did find reference to adding a filter in functions.php but it was for google fonts, so I didn’t add it.
What else do I need to do to prevent this delay in loading?
Thank you.
April 7, 2022 at 5:55 pm #2181589Fernando Customer Support
Hi Mary,
Upon testing your website, I found that one major factor which may contribute to the delay in the loading time of your font is the fact the your website is still using HTTP/1.
For reference: “HTTP2 is much faster and more reliable than HTTP1. HTTP1 loads a single request for every TCP connection, while HTTP2 avoids network delay by using multiplexing.
HTTP is a network delay sensitive protocol in the sense that if there is less network delay, then the page loads faster.”
With that said, it may be good to reach out to your hosting provider and see if they may assist you regarding this.
Hope this helps! 🙂
April 7, 2022 at 6:11 pm #2181593Mary Pearson
Many thanks Fernando. This is excellent information. I will definitely look into it.
April 7, 2022 at 6:38 pm #2181601Fernando Customer Support
You’re welcome Mary! Glad to be of assistance! Feel free to reach out anytime you’ll need assistance with anything else. 🙂
April 13, 2022 at 5:48 am #2187392Mary Pearson
My Systems Administrator has updated my server so that all websites are using HTTP2 protocol. It has not made a bit of difference to resolving my original problem of the font loading correctly on my website at https://4.bestwebsites.ca/
The font loads first with a default font, and then it switches to “Breathing”. There is a delay in loading, and then in switching.
Do you have any other suggestions that I might try?
Thank you.
April 13, 2022 at 5:58 am #2187402David
StaffCustomer SupportHi Mary,
in your
@font-face CSS
can you check the URLs for the.woff
and.woff2
files? As they are both 404ing.April 13, 2022 at 6:02 am #2187407Mary Pearson
Thank you David. Indeed the .woff and .woff2 files were showing as .woff-webfont and .woff-webfot. I have corrected this error and cleared cache, but the problem still exists.
Any other ideas?
April 13, 2022 at 6:14 am #2187419David
StaffCustomer SupportNot sure if its a network cache but i still see the woff fonts are 404ing.
So its still resorting to the .ttf ( which is a big file – around 280kb zipped – which is part of the delay in it being displayed )April 13, 2022 at 6:18 am #2187420Mary Pearson
Thank you David. Indeed I had only cleared my website cache, not my browser cache. Apologies. There is still a delay in loading the font on each page, but it no longer loads the default font, so this is a huge improvement and I can live with it, but if you have any other ideas to speed up the loading, please let me know. Otherwise I will close this ticket.
Thank you again!
April 13, 2022 at 6:31 am #2187432David
StaffCustomer SupportSorry – i am still seeing 404s on the font.
What URL have you added for them in your @font-face ?April 13, 2022 at 8:25 am #2187777Mary Pearson
Sorry for the delay in responding. Our power keeps going off and I lose internet. After reading your last response I changed my URLs to:
src: url(“https://4.bestwebsites.ca/wp-content/themes/generatepress_child/fonts/Breathing.ttf”) format(“ttf”);
src: url(“https://4.bestwebsites.ca/wp-content/themes/generatepress_child/fonts/breathing.woff”) format(“woff”),
src: url(“https://4.bestwebsites.ca/wp-content/themes/generatepress_child/fonts/breathing.woff2”) format(“woff2”),
src: url(“https://4.bestwebsites.ca/wp-content/themes/generatepress_child/fonts/Breathing.otf”) format(“otf”);
src: url(“https://4.bestwebsites.ca/wp-content/themes/generatepress_child/fonts/Breathing.eot”) format(“eot”); }Originally they were in /wp-content/uploads/breathing.woff etc.
Still no change – delay in loading.
April 13, 2022 at 8:27 am #2187780David
StaffCustomer SupportYeah those .woff files are not loading. If i go to this one for example:
https://4.bestwebsites.ca/wp-content/themes/generatepress_child/fonts/breathing.woff
it returns a 404.
April 13, 2022 at 8:38 am #2187798Mary Pearson
Thank you. I’ll download the font files again and see if that helps.
April 13, 2022 at 8:40 am #2187800David
StaffCustomer SupportLet us know how you get on!
April 13, 2022 at 8:41 am #2187802Mary Pearson
Many thanks! Will leave the ticket open until I have tried it if that’s OK.
-
AuthorPosts
- You must be logged in to reply to this topic.