1

I would like to call paid fonts via pub folder. I create the specific font folder in pub i.e

pub/static/frontend/Mageplaza/ultimate/en_US/fonts

and linked it my custom.css file font family is not working.

1 Answer 1

0

You are doing in a wrong way, As per magento standards, do not upload any files directly to the pub/ folder.

if you want to add font family upload the File under

web/css/fonts

in your custom theme or Module View folder. To call the font face, create/modify custom.css in following path,

web/css/custom.css

2
  • I placed it in my default theme but it's not working, that's why I'm trying different way to use the fonts.
    – Lucky
    Commented Jun 27, 2019 at 11:06
  • old post but this approach by Magento really irks me. Every time you deploy static files, visitors are made to download a new copy of the exact same font. It's wasteful! Font files don't change the way css do. They should be OUTSIDE the versioned tree.
    – iphigenie
    Commented Apr 7, 2023 at 14:36

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.