Font not load in Chrome and Mobile

Home Forums Use Any Fonts Font not load in Chrome and Mobile

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #6081
    martin
    Guest

    In Firefox and IE the fonts loaded well.
    But in Chrome and Opera do not load. Also when I want to see on the phone (android) i have the same problem

    #6082
    martin
    Guest

    I add the following: inspect the code I see an error message

    Failed to load resource: the server responded with a status of 404 (Not Found)
    http://www.secheep.com.ar/nuevositio/wp-content/uploads/useanyfont/160630094905Geomanist-Regular.woff

    And the file is hosted on that route. I checked by FTP

    #6083
    Dinesh
    Keymaster

    Hi Martin,

    It means that your server is not allowing to load the font files. Can you please keep this in your htaccess file and try ? The above link will not give 404 when the blocked is removed.

    <FilesMatch "\.(ttf|otf|eot|woff)$">
      <IfModule mod_headers.c>
        Header set Access-Control-Allow-Origin "*"
      </IfModule>
    </FilesMatch>

    If this doesn’t work, please ask your host provider to enable font (woff and eot format) for loading.

    Thanks

    #6105
    martin
    Guest

    .htaccess file corresponds add if the server is IIS? (My client has a plan Hosting with Windows and IIS on other issues).
    I’m putting the site on WP there anyway. The problem is for the above?
    In the same hosting provider (but Linux account) it works properly.

    #6108
    martin
    Guest

    Dinesh, the solution is really simple, just include the next block in the <system.webServer> section of the web.config file of our project:
    <System.webServer>
       […]
       <StaticContent>
         <Remove fileExtension = “. Woff” />
         <MimeMap fileExtension = “. Woff” mimeType = “application / x-font-woff” />
       </ StaticContent>
    </system.webServer>

    #6109
    Dinesh
    Keymaster

    Hi Martin,

    Sorry about the delay in reply.

    Glad you have fixed it and thank you so much for sharing the solution here.

    🙂

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Font not load in Chrome and Mobile’ is closed to new replies.