I have been building an GRAV based intranet and it is nearing its official launch.
Suddenly a tall order came through that demanding that 30% of the users do not have an internet access.
When I’ve tested the Grav based intranet the load was extremely slow (due to fetching fonts.googleapis.com in a closed environment. and plugins like [pdf-js]=cloudflare.com etc…).
While I’m using an original theme which extends antimatter, is there a correct or hassle free way to
stop accessing or using google fonts?
I’ve read that option to disable google font was found in the older versions of admin panel, but not missing in the current one.
Wouldn’t that get deleted as soon as the Antimatter theme gets an update?
Might be worth checking out theme inheritance and create a child theme I think…
@ryan To switch of Google fonts for both back-end (Admin) and front-end you will have to make some changes in two area’s:
Admin:
By default, the Admin panel does not use any Google fonts. The setting ‘google_fonts’ in ‘user/plugins/admin/admin.yaml’ is ‘false’ by default.
When changing the setting in ‘user/config/plugins/admin.yaml’ (note the different folders) to ‘true’, the admin panel will load:
This file is eventually compiled into ‘/user/themes/antimatter/css-compiled/template.css’.
In your own inherited theme you can prevent this import in several ways. You could change the scss and recompile it, or change the generated ‘template.css’ file, which is called by ‘/user/themes/antimatter/templates/partials/base.html.twig’ file:
{% do assets.addCss('theme://css-compiled/template.css', 101) %}
The last option is the most simple solution:
Copy ‘/user/themes/antimatter/css-compiled/template.css’ into your own theme’s ‘/user/themes/mytheme/css-compiled/template.css’
Since Montserrat, Raleway and Inconsolata are no longer fetched from Google, the stylesheet will fallback to "Helvetica", "Tahoma", "Geneva", "Arial", sans-serif; for body and headers.