Hi, looking at the current debate about the GDPR, it seems we are not allowed to use Google Fonts in the current form any longer. By using Google fonts, we transmit the IP address of the website visitor to Google. The IP address is a personal data and thus not allowed to be transmitted without consent.
BUT we are allowed to host the google fonts on our servers and to load them from there.
Question: How can I achieve this using Foundry? I know how to host the fonts on my server, but we do need the option within Foundry to select them there.
I know this is a hassle. But on the other hand, the fines are quite serious for not following the rules. So I hope Adam can help us here…?
There is but it is not obvious. I am not at my Mac at the moment but recall that I posted on here showing you could use a local font.
if you are doing a lot of sites it would be well worth getting FontPro and then load them as base64 from your server which is far better way of doing it. You can then use Typeface to point to the FontPro fonts or just use FontPro.
Thanks. If you have the time in the coming days - would you send me an example on how you added a custom google font to your site by hosting it on your server? So how did you download the font, how did you save it, did you need different formats of the font and which code you added at what location within RW?
I’ll owe you a famous german beer anytime you are around
Google Fonts are loaded through their CDN. This is to improve load times as well as ease of use. The stack uses their standard CDN calls to load the font.
There is not a feature in Foundry that specifically allows you to host the fonts on your own server. It could be done by defining the font yourself on your pages using your own custom CSS by creating an @font-face definition. You could then use the “Standard Font” option to reference it and add a fallback font, and whatnot. I know the first thing @webdeersign will point out is that I could add fields for the required fonts and allow the user to insert the web addresses of the various font types in those locations. This can lead to some problems though, so that isn’t a route I want to go at this time… letting the user insert URLs for these manually is a bit more risky than say an image URL because you won’t immediately catch possible errors right away because they’re not always as glaring as a missing image.
I’ve put in a feature request to @Isaiah for Stacks that would help me to implement what you’re wanting to do without needing to rely on the Foundry end user to upload and maintain font links and whatnot. If that API feature request comes through I would be glad to add in such a feature for Typeface, as well as add some other features in some of the other Foundry stacks.
TL;DR: Right now what you’re wanting to do isn’t something directly supported by the stack, but could be achieved by adding in your own @font-face definitions to the Custom CSS field and referencing that font in Typeface using the “Standard Font” option.
This is something I posted in the past when I was trying to fugue out how to use Typeface:
"To use a web font, you would normally add a folder containing the web fonts to your server, or you can do this via Resources in RW7. See https://css-tricks.com/snippets/css/using-font-face/3 to understand what you need in terms of web fonts. Just the Woff file may be enough.
For example, if you are using a font such as MuseoSlab-500, then you would drag the file MuseoSlab-500.woff into resources
You then need to add the following into the page wide CSS in the RW Settings - Code CSS section:
Thank you @elixirgraphics Can I just use a font on my webserver (or in my ressources) and add this one in the Foundry control stack at CUSTOM in the font setting, without using the type face stack? Which address should I use in this case, looking at webdeers example: url(’%resource(MuseoSlab-500.woff)%’) or else?
Thanks. Now I have the Font Lato in 300 and 700 weights. Also 300 italic and 700 italic. Each of them in all 4 formats. How do I set this up? All in one Font folder with subfolders? Have you got a description or an example for this setup using Foundry? Sorry for the dumb questions…