-
AuthorPosts
-
November 14, 2022 at 7:25 pm #1372563
Hey guys,
Got a question about custom fonts and the interaction with CDN’s.
If I upload a custom font, Litespeed can’t put it on the CDN. Instead it always pulls it from the local server, despite having the options enabled in Litespeed to host fonts on the CDN. Is this due to the way it’s being written into the enfold css perhaps?
See private field for an example.
Is there a way this could be altered so that Litespeed and perhaps other caching solutions is able to correctly host this on the CDN?
Thanks for your help
Tim
- This topic was modified 2 years ago by THP Studio.
November 18, 2022 at 8:34 am #1373041Hey Tim,
Sorry for the late reply.
I’m afraid there is no easy solution for that.
Icon and type fonts are uploaded in a zip file and our logic unpacks these files and copies content to a directory on the local server and stores link information in database which is used to add it to the css.
With upcoming version 5.3 we change the location where the unpacked files are stored (see https://kriesi.at/support/topic/enfold-upcoming-fixes/).
Unfortunately, I don’t have any experience with CDN’s and how the URL’s are handled.
But if you can copy the directories containing the unpacked files to your CDN location keeping the directory structure maybe it is possible to change the server source only ?
Best regards,
GünterJanuary 1, 2023 at 7:00 pm #1377351Hey Gunter,
Hope you had a good break.
Just wanted to check if this other thread: https://kriesi.at/support/topic/bug-cdn-use-and-fonts-loading-twice/ and your new solution might also help with this issue related to the CDN and font location?
Thanks
January 2, 2023 at 5:02 pm #1377380Hi,
Yes I think it should. Using the option “Performance -> Show Advanced -> Custom Font Loading Source” (5.4) will supress the output of @font-face in dynamic css file.
So if you copy the files to your CDN and handle the @font-face CSS rule by yourselfe it should work.Best regards,
GünterJanuary 2, 2023 at 5:25 pm #1377383Hi,
Ok great thanks, I’ll try it out.
Regards
Tim
-
AuthorPosts
- The topic ‘Custom fonts and CDN’ is closed to new replies.