Hello, what is proper way to include custom fonts to sage9 theme?
i’ve tried with
src: url("…/fonts/Barlow-Regular.ttf") format(‘ttf’);
font-family: Barlow-Regular, sans-serif;
but it doesn’t change font.
@dzoniis not sure if it would be enough to break it, but I believe the format should be “truetype” and not “ttf”. Also, double checking: I’m assuming you ran
yarn build before testing?
Tried with truetype and used yarn build ofcourse
Yep, they are in dist/fonts and location of Barlow-Regular.ttf is in that location
I have no 404 errors or something like that, it just won’t display it
@dzoniis - hm, don’t have a lot of trouble shooting ideas left.
Assuming you haven’t solved the problem on your end yet, if you change your style to this, do you see a serif font being used?
font-family: Barlow-Regular, serif;
If so, that will confirm that the browser a) is picking up your style and applying it to the element you’r testing with and b) knows it can’t find the Barlow font.