MAGENTO 1.X – IMPORT A NEW FONT ON MAGENTO


In some cases, you will need to import a new font on your Magento store.

This could be from two different ways:

  • From a google repository

Add it on the local.xml file under tag default of your layout as follow:

When the xml is renderized, it should add all the @font-face tags into your main css file.

  • From an otf file.

Include the fontface media tag on your css file, and then, the corresponding font under the body tag:

In both cases, you will need to add the font for a particular class, this should be adding the font-family, like below:

IMPORTANT

It’s always a bad practice to use the @import url on your css file, to import your new fonts.

eg: