Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Chrome not picking up @font-face OTF

Tags:

css

My site here won't pick up 'proxima nova' otf in Chrome and can't understand why.. Here's the CSS:

@font-face {
    font-family:'Proxima Nova';
    src: url("/Fonts/ProximaNova-Regular.otf") format('opentype');
}

Any ideas much appreciated.

like image 780
321 Avatar asked Nov 15 '12 15:11

321


People also ask

How do I enable OTF fonts?

Enable OpenType Features in Microsoft Word To access OpenType features in Word, select the text and choose Format > Font then in the dialog box that appears go to the Advanced tab and choose a Stylistic set from the dropdown or enable Contextual Alternates.

Do OTF fonts work on Chrome?

TTF/OTF - TrueType and OpenType font support is Fully Supported on Google Chrome 71. If you use TTF/OTF - TrueType and OpenType font support on your website or web app, you can double-check that by testing your website's URL on Google Chrome 71 with LambdaTest.

Can I use OTF instead of TTF?

There is really no issue for the end user as almost all modern applications that uses fonts are able to work with TTF and OTF files. Users don't need to choose one over the other as they can be used together in creating documents or printing layouts.

Can OTF fonts be used on the Web?

Different Font Formats and Browser Support However, even today, not all formats are supported on every browser. I'd always recommend using TTF/OTF and WOFF to ensure that your fonts are supported across all browsers.


1 Answers

Just encountered the same problem, you don't need to specify format for otf fonts, just remove the last part of the src attribute:

@font-face {
    font-family:'Proxima Nova';
    src: url("/Fonts/ProximaNova-Regular.otf");
}

This comment helped me to sort this problem out:

https://github.com/facebook/create-react-app/issues/2609#issuecomment-311231425

like image 139
Elias Platek Avatar answered Nov 10 '22 01:11

Elias Platek