pmoreno-rodriguez / grav-theme-editorial

Editorial is a GravCMS port of the Editorial theme from HTML5Up.net.
https://editorial.pmdesign.dev
Other
15 stars 4 forks source link

Serve google fonts locally #19

Closed Finn10111 closed 1 year ago

Finn10111 commented 1 year ago

Some people may have privacy concerns if the Google fonts are loaded from Google's servers. I downloaded the used fonts and added them to the theme so they are served locally now. This should be GDPR compliant now.

What do you think? I know it's "common" to use fonts.googleapis.com but I am not a big fan of this instead. I was thinking to do this within a child theme but this seemed to be the better approach.

pmoreno-rodriguez commented 1 year ago

Hi @Finn10111

I'll take a look at your suggestion. I'm thinking it would be a good idea to give users two options: one is to load google fonts from the internet and the other is to load from a local file.

what do you think about it?

Finn10111 commented 1 year ago

Yes you are right, some people prefer fonts.googleapis.com because of caching and other reasons. But I have to admin that I don't have a lot of experience with Grav and I am not sure how to do that. If you could give me a hint I would like to have dig deeper to find that kind of solution.

Finn10111 commented 1 year ago

Thanks for your suggestion, this one works for me now. But I don't know if it's the way to go.

pmoreno-rodriguez commented 1 year ago

HI @Finn10111 Is the google-font.css file really necessary? So far you have uploaded two css style sheets for google fonts, the first with -local.css and the second with -remote.css

Finn10111 commented 1 year ago

@pmoreno-rodriguez I didn't know how to choose between the local or remote Google Fonts so I put them in two css style sheets and put the logic in the template, I hope this was okay.

pmoreno-rodriguez commented 1 year ago

@Finn10111 I was referring to a third file called google-fonts.css. In your pull-request you have used two files, one ending in -local.css and the other in -remote.css.

However, it is already included in the new version of the Editorial theme.

For the next version I would like to count on your help and extend the local Google fonts file, to the rest of the encodings that are included in the original (Cyrillic, Vietnamese, Greek, etc.). Currently only the Latin encoding is included.