Jump to content

@font-face doesn't work


ale.pixel

Recommended Posts

Hello!

As the title of the topic suggests, I can't make the @font-face to work on my child theme. I have set up everything in my CSS, uploaded the font files in the directory I have listed

@font-face {
    font-family: 'myFont';
    src: url('../fonts/myFont.eot');
    src: url('../fonts/myFont.woff2') format('woff2'),
        url('../fonts/myFont.woff') format('woff'),
        url('../fonts/myFont.ttf') format('truetype'),
        url('../fonts/myFont.svg#FuturaPT-Book') format('svg'),
        url('../fonts/myFont.eot?#iefix') format('embedded-opentype');
    font-weight: normal;
    font-style: normal;
}

and then I assigned the font-family to the element I wanted

h1 { font-family:'myFont'; }

but nothing, it doesn't really read the font I uploaded.

 

Am I doing something wrong or is it just PrestaShop that works in its own way?

Link to comment
Share on other sites

Font things are related to CSS so noting related to Prestashop. For the working to same, Font file path should be correct directory (On the correct relative path according the CSS file).

Also, check the other CSS things like h1 exist on the page & also h1 CSS properties are not being overridden by other CSS etc.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...