Showing results for 
Search instead for 
Did you mean: 

Removing completely Open Sans from custom theme that uses Luma as parent

Removing completely Open Sans from custom theme that uses Luma as parent


I'm going crazy trying to work this out.

We are building a child theme that doesn't use Open Sans in its design, but will use Google or Adobe Fonts. We've tried to remove Open Sans, but I'm certain we are doing it wrong, as in our CSS there is a reference to it still.


I need to remove Open Sans and any reference to it, and assign my Google font to my theme and my email templates - a task which right now seems insanely complicated - is changing a font really this difficult?


I've read the official Magento Documentation on using custom fonts but I find it very confusing.

I've added the Google font reference and the following to default_head_blocks.xml 

<remove src="fonts/opensans/light/opensans-300.woff2"/>
<remove src="fonts/opensans/regular/opensans-400.woff2"/>
<remove src="fonts/opensans/semibold/opensans-600.woff2"/><remove src="fonts/opensans/bold/opensans-700.woff2"/>


I read on other forums this should be done because from somewhere Open Sans is getting called, I can't for the life of me work out where from. This works, it doesn't get called in the head of the site, but in my CSS there is still reference to Open Sans.

I've looked through the variables .LESS files on github, but again, no mention of Open Sans anywhere.


I've also read somewhere that I need to add  _typography.less to /my_theme/web/css/ folder, and reference my font, but I believe this is to replace local webfonts, not external ones - but besides that I don't understand at all the code, as it seems to be quite complex (for my capability). Also, I've read that in that file I should remove reference to Open Sans, but there isn't any reference to it.


So basically:

How to remove any reference to Open Sans correctly from my theme.


Can anyone explain or point me to a really simple step by step guide?


Thanks for any help on this.