Tagged: GDPR, google fonts
-
AuthorPosts
-
February 24, 2022 at 9:35 pm #1342183
Hello
due to current reports regarding GDPR and an email by complianz I decided to move Google Fonts locally.Lato is set to my Header and Body font. So search for it on
https://google-webfonts-helper.herokuapp.com/fonts/lato?subsets=latinI created a folder under wp-content/themes/fonts and uploaded Lato 300, 400 and 700.
In enfold-child/styles.css I added the following…/* lato-300 – latin */
@font-face {
font-family: ‘Lato’;
font-style: normal;
font-weight: 300;
src: url(‘../fonts/lato-v22-latin-300.eot’); /* IE9 Compat Modes */
src: local(”),
url(‘../fonts/lato-v22-latin-300.eot?#iefix’) format(’embedded-opentype’), /* IE6-IE8 */
url(‘../fonts/lato-v22-latin-300.woff2’) format(‘woff2’), /* Super Modern Browsers */
url(‘../fonts/lato-v22-latin-300.woff’) format(‘woff’), /* Modern Browsers */
url(‘../fonts/lato-v22-latin-300.ttf’) format(‘truetype’), /* Safari, Android, iOS */
url(‘../fonts/lato-v22-latin-300.svg#Lato’) format(‘svg’); /* Legacy iOS */
}
/* lato-regular – latin */
@font-face {
font-family: ‘Lato’;
font-style: normal;
font-weight: 400;
src: url(‘../fonts/lato-v22-latin-regular.eot’); /* IE9 Compat Modes */
src: local(”),
url(‘../fonts/lato-v22-latin-regular.eot?#iefix’) format(’embedded-opentype’), /* IE6-IE8 */
url(‘../fonts/lato-v22-latin-regular.woff2’) format(‘woff2’), /* Super Modern Browsers */
url(‘../fonts/lato-v22-latin-regular.woff’) format(‘woff’), /* Modern Browsers */
url(‘../fonts/lato-v22-latin-regular.ttf’) format(‘truetype’), /* Safari, Android, iOS */
url(‘../fonts/lato-v22-latin-regular.svg#Lato’) format(‘svg’); /* Legacy iOS */
}
…It works for Lato – it is now loaded locally.
@font-face { font-family: “Lato”; src: local(“”), url(“https://sinnvoll-fuehren.com/wp-content/themes/fonts/lato-v22-latin-regular.eot?#iefix”) format(“embedded-opentype”), url(“https://sinnvoll-fuehren.com/wp-content/themes/fonts/lato-v22-latin-regular.woff2”) format(“woff2”), url(“https://sinnvoll-fuehren.com/wp-content/themes/fonts/lato-v22-latin-regular.woff”) format(“woff”), url(“https://sinnvoll-fuehren.com/wp-content/themes/fonts/lato-v22-latin-regular.ttf”) format(“truetype”), url(“https://sinnvoll-fuehren.com/wp-content/themes/fonts/lato-v22-latin-regular.svg#Lato”) format(“svg”); font-style: normal; font-weight: 400; }However, Lato-Light still loads from https://fonts.gstatic.com/s/lato/v22/S6u9w4BMUTPHh7USSwiPGQ3q5d0.woff2
@font-face { font-family: “Lato”; src: url(“https://fonts.gstatic.com/s/lato/v22/S6u9w4BMUTPHh7USSwiPGQ3q5d0.woff2”) format(“woff2”); font-style: normal; font-weight: 300; unicode-range: U+0-FF, U+131, U+152-153, U+2BB-2BC, U+2C6, U+2DA, U+2DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }Why does it not work? Any hints on what I need to change?
Cheers,
RalphPS: Shouldn’t this become a standard feature in Enfold, to host fonts locally?
February 25, 2022 at 4:53 am #1342221Hey Ralph,
Thank you for the inquiry.
You can actually upload Google fonts to your own server using the Enfold > Import/Export > Custom Font Manager. Please check this documentation for more info.
// https://kriesi.at/documentation/enfold/typography/#how-to-upload-custom-fonts
Best regards,
IsmaelFebruary 25, 2022 at 10:38 am #1342250Hey Ismael
I tried that – I didn’t get this to work. I uploaded Lato zip with 300,400,700 – it only recognised 400.
Thus I tried the other way. That works apart from Lato-Light. Thus my question – how do I get it to work?Cheers,
RalphFebruary 25, 2022 at 1:07 pm #1342269if you only use these selfhosted fonts – you can hamper Enfold to load google fonts at all.
this here seems to be the actual prefered snippet:
function my_output_google_webfonts_script( $activate ){ return false; } add_filter( 'avf_output_google_webfonts_script', 'my_output_google_webfonts_script', 10, 1 );
- This reply was modified 1 year, 11 months ago by Yigit.
February 25, 2022 at 1:41 pm #1342271Dear Guenni
Thanks for this hint.
Strange – at first, Lato Light wasn’t loaded but it was replace by Lato normal. Then I thought I change the style for H3 explictly – Lato + 300. This didn’t look good, so I removed H3 again. Reload page and suddenly Lato Light is loaded… I’m puzzled – and it seems it works now. Maybe it was a cache problem? However, I emptied the caches. I guess I know now more where to play around with this.
Cheers,
RalphFebruary 25, 2022 at 3:50 pm #1342285Hi Ralph,
Great, I’m glad that you got it working, it might have been caching. Please let us know if you should need any further help on the topic or if we can close it.
Best regards,
RikardFebruary 28, 2022 at 10:30 am #1342521Hi
On another site I got it to work in the intended way.
May I suggest a little feature fix: when uploading a font file with several fonts in it, it would be great to see this in the Custom Font Manager. Despite that I uploaded 100, 300, 400, 700, … it only showsFont: lato v22 latin ( font-family: lato-v22-latin )
normal: 400
italic: 400Cheers,
RalphMarch 2, 2022 at 4:24 am #1342796Hi,
Thank you for the update.
The variations should be listed properly in the font manager after uploading a font. Would you mind posting the zip file that you actually uploaded in the site? We would like to test it on our installation.
Best regards,
IsmaelMarch 2, 2022 at 7:18 am #1342805Hi Ismael
I downloaded the font package from https://google-webfonts-helper.herokuapp.com/fonts/lato?subsets=latin
Where do you get the fonts from?Link to the actual zip file is attached below.
Thanks for testing this on your site.
Cheers,
RalphMarch 3, 2022 at 5:03 am #1342951Hi,
You may need to retrieve the font directly from Google fonts instead of the third party application or site. Have you tried uploading fonts that have been downloaded directly from Google?
Best regards,
IsmaelMarch 3, 2022 at 9:55 am #1342969Hi,
that looks a lot better. Sorry for the discussion. Maybe add the link https://fonts.google.com/ to your documentation regarding installing own fonts?
Cheers,
RalphMarch 3, 2022 at 1:12 pm #1342998Hi Ralph,
Please see the list here – https://kriesi.at/documentation/enfold/typography/#where-to-find-fonts-for-mynbspprojects
Regards,
YigitMarch 3, 2022 at 2:42 pm #1343018Ok – I missed that. Sorry. You can close this ticket.
Best wishes
RalphMarch 3, 2022 at 3:36 pm #1343023 -
AuthorPosts
- The topic ‘Localize Google Fonts’ is closed to new replies.