Magento – how do add new font in magento2 with custom module in frontend

font familymagento2modulexml

in magento2 we add new font in .xml file .I have idead create module manager fonts in admin magento2. so how to get all font name in core, and set new font in front-end?

I don't know i can edit .xml file with custom block?

any suggestion?

Best Answer

Include link for the font in header of Magento using the below-mentioned code

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <head>
        ...
        <link href="https://fonts.googleapis.com/css?family=Space+Mono"
rel="stylesheet">
        ...
    </head>
</page>
Related Topic