Unable to load custom fonts from google -> site, but able to when you visit site directly
See original GitHub issueHi AMP,
I’m getting net::ERR_ABORTED for all my fonts when loading my site via https://www.google.dk/amp/www.swipty.dk/ (shown in the picture below), but if I load my site https://www.swipty.dk it loads the fonts fine. I don’t think I’ve done anything wrong in my code, but please enlighten me if that’s not the case. I hope you have a solution as my designer thinks it’s very important.
`@font-face{ font-family: ‘Raleway’; font-style: bold; font-weight: 700; src: url(‘fonts/Raleway-Bold.ttf’) format(‘truetype’); }
@font-face{ font-family: ‘Raleway’; font-style: medium; font-weight: 500; src: url(‘fonts/Raleway-Medium.ttf’) format(‘truetype’); }
@font-face{ font-family: ‘Raleway’; font-style: normal; font-weight: 400; src: url(‘fonts/Raleway-Regular.ttf’) format(‘truetype’); }
@font-face{ font-family: ‘Raleway’; font-style: lighter; font-weight: 300; src: url(‘fonts/Raleway-Thin.ttf’) format(‘truetype’); }`
Issue Analytics
- State:
- Created 6 years ago
- Comments:11 (6 by maintainers)
@MohammedKaludi I am pinging the folks working on AMP Cache infra, thanks for your patience.
@LeandroTk would be a serving configuration on the server you are using to serve fonts, how to change this would really depends on the server stack you are using.