skip to Main Content

Why these two font cannot load after I upload to CPANEL, in localhost everything running well

I have a problem with this

enter image description here

2

Answers


  1. I guess the problem is with the font file address. As others mentioned, please ensure that the file is uploaded correctly and their permission is set correctly.

    Then, have you used the ‘url’ helper function to call the font? if not please try it and share back the result.

    if your font dir is in public folder then:

     @font-face { 
         src: url('/fonts/simple-line-icons.woff');
     }
    
    Login or Signup to reply.
  2. Try uploading your font assets in public folder.

    Also be sure that you can access them through url, for example:

    https://example.com/public/fonts.ttf or woff
    

    In your font css style, Do this:

    @font-face { 
          src: url('/fonts/yourfont.woff'); 
    }
    

    Test that you can access to your fonts like this:

    @font-face { 
          src: url('https://example.com/public/fonts.ttf'); 
    }
    

    If the above code worked successfully, then you should check that the file is uploaded to CPanel correctly.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search