0

I am trying to import a font (have Luma theme installed) with no success. Browsed similar threads about this, made changes in typography and variable files, but still can't get rid of the default 'Open sans' font.

Here's my css file:

@font-face {
font-family: 'Chalet';
font-style: normal;
font-weight: 400;
src: url('C:xampp/htdocs/testshop/vendor/magento/theme-frontend-  luma/web/fonts/LEGO-Chalet-60-Tab-Regular.eot'); /* IE9 Compat Modes */
src: local('Chalet'), local('Chalet'),
url('../fonts/LEGO-Chalet-60-Tab-Regular.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */

   url('../fonts/LEGO-Chalet-60-Tab-Regular.woff') format('woff'), /* Modern Browsers */
   url('C:xampp/htdocs/testshop/vendor/magento/theme-frontend-  luma/web/fonts/LEGO-Chalet-60-Tab-Regular.ttf') format('truetype'), /* Safari, Android, iOS */

}  (tried also full local path)

Any ideas?

1
  • did you get any solution ? Commented Jan 19, 2018 at 10:34

1 Answer 1

0

Magento Docs http://devdocs.magento.com/guides/v2.0/frontend-dev-guide/css-topics/using-fonts.html

Looks like the path is not correct should be

app/design/frontend/Vendor/theme/web/fonts

4
  • Already tried that. Actually this path in my installation is app/design/frontend/Magento and then empty.
    – marilena6
    Commented Apr 4, 2017 at 10:00
  • So then You installed via composer. path is vendor/magento/theme-frontend- luma/web/fonts/LEGO-Chalet-60-Tab-Regular.ttf so use @font-path: '@{baseDir}fonts/LEGO-Chalet-60-Tab-Regular.ttf',
    – Martins
    Commented Apr 4, 2017 at 10:07
  • '@{baseDir}fonts/LEGO-Chalet-60-Tab-Regular.ttf - In which file will this go? css or other file? Because I tried both the css and typography.less and still doesn't work, I'm frustrated... :/
    – marilena6
    Commented Apr 5, 2017 at 8:42
  • so this worked out ?
    – Martins
    Commented Apr 5, 2017 at 8:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.