Using google font local at vantage theme
The Vantage theme 1.7.9 has an hard coded call to the google font url:
<style type="text/css" id="customizer-css">@import url(https://fonts.googleapis.com/css?family=Open+Sans:400); ...
This makes it hard to host the google fonts locally as guided by this or others:
https://www.news47ell.com/how-to/host-google-fonts-locally-wordpress/
Do you think the vantage theme could use the official wordpress method of using wp_enqueue_style(..) in the next update so the method to use local google fonts will work? Thanks
This is our free support forum. Replies can take several days.
Need fast email support? Get SiteOrigin Premium
Replies
1Hi KochGu,
The highlighted CSS is generated in inc/customizer/customizer.php. That file hasn’t been edited in a while (2+ years ago) so this hasn’t been noticed – previously it likely wasn’t done due to // being less commonplace/supported. I’ve submitted a PR that will change this in the next update.
As a counterpoint to the linked article, I recommend against doing this as the performance impact will actually be greater by self-hosting the font. For more information, please refer to this Google explanation.
I’ve logged your feature request with the development team. Due to the context of the CSS, we originally opted for the @import but I can definitely see why you may want to replace the URLs.
As a current workaround due to the above limitation, I would revert the font settings to default web safe fonts (this will remove all of the imports) and then manually add @font-face CSS using SiteOrigin CSS.
Replies on this thread are closed.
Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.