Mark
Mark

Reputation: 35

Font failed to load on server?

both font works locally but on server elkwood works and avenir doesn't work i got no idea why. please see image

i also tried font-family: "AvenirNextLTPro-Regular"; src: url( "/fonts/AvenirNextLTPro-Regular.otf" );

screenshot details

Upvotes: 1

Views: 838

Answers (1)

Shyju
Shyju

Reputation: 218862

IIS does not know to serve the request for .otf files. We need to explicitly tell IIS that these are valid file types. To do that, Add this section to your web.config under <system.webServer> section.

<staticContent>    
  <mimeMap fileExtension=".otf" mimeType="font/otf" />
</staticContent>

Upvotes: 5

Related Questions