How can I remove default fonts ('Open Sans', 'Helvetica Neue' and Helvetica)? I just use Arial and sans-serif only..
Thanks
font familymagento2
How can I remove default fonts ('Open Sans', 'Helvetica Neue' and Helvetica)? I just use Arial and sans-serif only..
Thanks
Best Answer
To remove the fonts you can override the
_typography.less
file within your theme. I just did this as was using custom fonts and wanted to remove the unnecessary old fonts from being downloaded.Move
/vendor/magento/theme-frontend-blank/web/css/source/_typography.less
to/app/design/frontend/Vendor/Theme/web/css/source/_typography.less
and remove the font from the new_typography.less
file.Remove any of the above if they are not required anymore.
Update (Preload Tags)
Magento includes certain resources as preload tags when fonts are added via XML. The Magento core adds these fonts to XML within default_head_blocks.xml for the blank theme for the above fonts. Warnings shows in Chrome saying about fonts downloaded that aren't used if this is the case.
So additionally add below to your
default_head_blocks.xml
within your theme to make sure the files aren't still downloaded: