- This topic has 7 replies, 3 voices, and was last updated 4 months, 2 weeks ago by
Fernando.
-
AuthorPosts
-
October 31, 2022 at 10:29 pm #2396244
Hywel
Hi, was following your guide to adding fonts locally and I keep getting this message…
“life-savers-v18-latin-regular.ttf” has failed to upload.
Sorry, you are not allowed to upload this file type.Any advice?
Thanks
November 1, 2022 at 2:56 am #2396450David
StaffCustomer SupportHi there,
we provide a snippet in this doc to allow those additional mime types :
https://docs.generatepress.com/article/adding-local-fonts/#uploading-our-font
But … unless you’re doing some custom development with the font, you don’t require TTF versions of a google font.
So don’t bother uploading them, and remove them from your @font-face CSS.Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/November 1, 2022 at 11:57 pm #2397681Hywel
Hi, I used the snippet provided in that document but it still gives the error.
add_filter( ‘upload_mimes’, function( $mimes ) {
$mimes[‘woff’] = ‘application/x-font-woff’;
$mimes[‘woff2’] = ‘application/x-font-woff2’;
$mimes[‘ttf’] = ‘application/x-font-ttf’;
$mimes[‘svg’] = ‘image/svg+xml’;
$mimes[‘eot’] = ‘application/vnd.ms-fontobject’;return $mimes;
} );Anyway I uploaded this without the ttf line…
/* life-savers-regular – latin */
@font-face {
font-family: ‘Life Savers’;
font-style: normal;
font-weight: 400;
src: url(‘https://www.kohlipeisland.org/wp-content/uploads/2022/11/life-savers-v18-latin-regular.eot’); /* IE9 Compat Modes */
src: local(”),
url(‘https://www.kohlipeisland.org/wp-content/uploads/2022/11/life-savers-v18-latin-regular.eot?#iefix’) format(’embedded-opentype’), /* IE6-IE8 */
url(‘https://www.kohlipeisland.org/wp-content/uploads/2022/11/life-savers-v18-latin-regular.woff2’) format(‘woff2’), /* Super Modern Browsers */
url(‘https://www.kohlipeisland.org/wp-content/uploads/2022/11/life-savers-v18-latin-regular.woff’) format(‘woff’), /* Modern Browsers */
url(‘https://www.kohlipeisland.org/wp-content/uploads/2022/11/life-savers-v18-latin-regular.svg#LifeSavers’) format(‘svg’); /* Legacy iOS */
}I can see the font under Typography Manager but when I select it it does nothing.
November 2, 2022 at 12:39 am #2397732Fernando Customer Support
Hi Hywel,
To clarify, when you use Life Saver as a font in the Typography, it doesn’t work?
If so, can you provide admin login credentials so we can take a closer look at the issue?
Please use the Private Information field for this: https://docs.generatepress.com/article/using-the-premium-support-forum/#private-information
November 2, 2022 at 9:09 pm #2399265Hywel
Hi,
To clarify, when you use Life Saver as a font in the Typography, it doesn’t work?
Yes that’s correct.
Thanks
November 2, 2022 at 9:41 pm #2399285Fernando Customer Support
Thank you. The links in your @font-face rules seem to be incorrect. Can you go to Media > Library, and re-copy and paste the links of the fonts from there?
November 3, 2022 at 10:39 pm #2400914Hywel
Hi,
I have redone the process and It’s now working. Which is odd considering it didn’t work the previous 4 times I tried! Thanks for your help anyway.
November 3, 2022 at 11:24 pm #2400941Fernando Customer Support
You’re welcome Hywel! Glad it’s working now!
-
AuthorPosts
- You must be logged in to reply to this topic.