ale.pixel Posted August 27, 2020 Share Posted August 27, 2020 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 More sharing options...
Knowband Plugins Posted August 30, 2020 Share Posted August 30, 2020 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 More sharing options...
ale.pixel Posted September 2, 2020 Author Share Posted September 2, 2020 I made it work by putting the font files in the same directory of the css. Before, they were in the "fonts" folder that was at the same level of the "css" folder, but it didn't work, I don't know why. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now