Magneto 2.4 - Remove Blank-Theme-Icons/Blank-Theme-Icons.woff2
-
15-04-2021 - |
Question
In our Magento 2.4 we created our own theme based on the Luma theme.
Now we found out that every page loads the Blank Theme Icons font. /fonts/Blank-Theme-Icons/Blank-Theme-Icons.woff2
How can we remove this?
We already tried the following in /Magento_Theme/layout/default_head_blocks.xml
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<head>
<remove src="fonts/Blank-Theme-Icons/Blank-Theme-Icons.woff2"/>
</head>
</page>
But still the file is loaded. What are we missing here?
Pas de solution correcte
Autres conseils
I finally got this solved.
@font-face for the icons are defined in lib/web/css/source/lib/_typography.less
You can remove the font icons if you remove line 10 - 43 completely or simply by adding a not
on line 17.
See not added in caps.
.lib-font-face(
@family-name,
@font-path,
@font-format: false,
@font-weight: normal,
@font-style: normal,
@font-display: auto
) when NOT (@font-format = false) {
@font-face {
font-family: @family-name;
src: url('@{font-path}.woff2') format('woff2'),
url('@{font-path}.woff') format('woff');
font-weight: @font-weight;
font-style: @font-style;
font-display: @font-display;
}
}
Licencié sous: CC-BY-SA avec attribution
Non affilié à magento.stackexchange