Tagged: Google Font Family
- This topic has 3 replies, 4 voices, and was last updated 2 years, 10 months ago by Theme Horse Support Team.
-
AuthorPosts
-
March 27, 2018 at 9:24 am #55599WolfgangParticipant
Hey there,
I want to remove Google fonts, because the new GDPR .
So i downloaded the fonta and put it into the
wp-content/themes/ambition-pro/fonts/ folder.So where i have to add the @font-face { CSS?
I tried it in the style.css, but the fonts still are loaded from google!
I tried it this way:@font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 400; src: url('http://dev.ramser-elektro.at/wp-content/themes/ambition-pro/fonts/open-sans-v15-latin-regular.eot'); /* IE9 Compat Modes */ src: local('Open Sans Regular'), local('OpenSans-Regular'), url('http://dev.ramser-elektro.at/wp-content/themes/ambition-pro/fonts/open-sans-v15-latin-regular.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ url('http://dev.ramser-elektro.at/wp-content/themes/ambition-pro/fonts/open-sans-v15-latin-regular.woff2') format('woff2'), /* Super Modern Browsers */ url('http://dev.ramser-elektro.at/wp-content/themes/ambition-pro/fonts/open-sans-v15-latin-regular.woff') format('woff'), /* Modern Browsers */ url('http://dev.ramser-elektro.at/wp-content/themes/ambition-pro/fonts/open-sans-v15-latin-regular.ttf') format('truetype'), /* Safari, Android, iOS */ url('http://dev.ramser-elektro.at/wp-content/themes/ambition-pro/fonts/open-sans-v15-latin-regular.svg#OpenSans') format('svg'); /* Legacy iOS */ }
March 30, 2018 at 12:37 pm #55639Theme Horse Support TeamKeymasterHi Wolfgang,
You also need to remove register style and enqueue styles code.
Just open theinc/functions/function.php
file and you will see below code please remove it or just make it comment to disablewp_register_style( 'ambition_google_font', '//fonts.googleapis.com/css?family='.$ambition_google_font_load .':700,700italic,400,300,300italic,400italic,600,600italic'); wp_enqueue_style( 'ambition_google_font' );
And also please check the exact path where you have added the font.
Thank you!
February 6, 2022 at 4:03 pm #96780JuergenParticipantDear Theme Horse-Support,
There is a new court verdict from Feb 2022. “The decision, by Landgericht München’s third civil chamber in Munich, found that the website, by including Google-Fonts-hosted font on its pages, passed the unidentified plaintiff’s IP address to Google without authorization and without a legitimate reason for doing so. And that violates Europe’s General Data Protection Regulation (GDPR).”, see https://www.theregister.com/2022/01/31/website_fine_google_fonts_gdpr/
Unfortunately, it doesn’t yet work to edit the inc/functions/functions.php as you’ve described by just commenting two lines. In the functions file there are a lot of relations to “ambition_google_font”.
How do I have to edit them to ensure that the fonts are delivered locally?
Pls see the whole functions here: https://dateien.berliner-digitalbuero.de/jj9QEdH
Best regards
Juergen
February 20, 2022 at 1:47 am #97152Theme Horse Support TeamKeymasterHi Juergen,
We apologize for the late response. We are investigating this issue for the appropriate solution.
You can follow the previous instruction to remove the
"wp_register_style"
and"wp_enqueue_style"
. and follow as instructed below.- Download the Font-family
- Convert the Font for the Web. after converting the font files will have in format like ‘eot’, ‘woff2’, ‘woff’, ‘ttf’, ‘svg’. You can find various website to convert the font to Web.
- Upload the Font-family inside the Theme Directory.
- After converting Font to Web you will find a css file about font families with its font links. You have to change the link to the exact font directory. Like you can see on previous reply by ‘Wolfgang’
- Copy the code and paste it to the style.css file
- Also, paste the below code to style.css file of on the addition CSS field (Appearance > Customize > Ambition Theme Option > Custom CSS)
body { font-family: 'Open Sans'; }
NOTE: Here the Example is shown for the ‘Open Sans’ Font family. You have to use the same font family as used in the codes of font-family that was copied after converting to the web.
Also, make sure you make the Child theme first before adding the fonts and customizing the style.css file so that the customized code won’t get lost while Updating the Theme to a New version in the Future.Thanks
-
AuthorPosts
- You must be logged in to reply to this topic.