Archived topic
Lato preload/css issue
7 replies · Started by Matt on April 21, 2021
Using the dispatch theme with GP premium and doing some speed testing I think I've found an issue.
I saw google fonts was being called as a preload, even though I've specifically hosted my font locally (Inter) and set everything to not call on google fonts.
The preload seems to be related to this css: -
.widget-title{font-family:"Lato", sans-serif;font-weight:500;text-transform:uppercase;}
which was in the minified css and is also present in the site library preview css. I can't see that the font for widgets can be set in the customizer, and I can't see that any of the widgets have custom css set so I think it's hard coded.
I used this to get around it for now: -
.widget-title{font-family:"Inter"} !important
Hi there,
That's not hardcoded. That's from generate-style-inline-css which is the CSS generated from the customizer settings.
That "Lato" you see is set on Appearance > Customizer > Typography by default when you import Dispatch.
If want to replace it, do it within the customizer. This way, the request is also removed/replace with the appropriate font.
I have the Inter font selected in customizer and the other Headings are set to inherit, that's the issue.
Inter is a self hosted font I had followed the gp guide to define the new font to be selectable, self hosted, and defined the font face in css all as per the guide.
There is no way I can see to change the widget-title font in customizer, so I'm assuming the initial value in mysql from the import is still used rather than the customizer value.
Hi there,
what is the Customizer > Typography > Body font set to ?
The Inherit option inherits from the Parent container font - which for the theme will be the Body font.
If you want all Headings to Inter then you will need to set them as such.
Inter is the body font
Whats the Customizer > Typography > Widgets --> Widget Titles set to ?
Aha, that's the issue.
I didn't have the Typography module activated. Have activated and now changed the relevant font.
Can I now disable and it would stay with what was saved?
Hi there,
It should be kept after disabling but you don't have to disable it. It doesn't affect front-end performance.