question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to load custom fonts from google -> site, but able to when you visit site directly

See original GitHub issue

Hi 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’); }`

screen shot 2017-11-23 at 16 33 55

screen shot 2017-11-23 at 16 40 56

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
aghassemicommented, Mar 2, 2018

@MohammedKaludi I am pinging the folks working on AMP Cache infra, thanks for your patience.

0reactions
aghassemicommented, Oct 16, 2018

@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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Use Google Fonts and Custom Fonts in Jotform
Importing Google Fonts into Your Form · Open the Form Designer panel in Form Builder. · Go to the Styles tab. · Paste...
Read more >
How to Install Custom Fonts for Google Docs - Alphr
Open the extracted font folder, then right-click one of the Google font files and select the Install option on the context menu.
Read more >
How to load web fonts to avoid performance issues and speed ...
There are just four steps to consider when loading a custom web font: Use the correct font format; Preload fonts; Use the correct...
Read more >
Custom Fonts Not Displaying On Front End - Elementor
Go to Elementor > Custom Fonts. If the URLs listed do not begin with https, click the DELETE button next to each, and...
Read more >
How to import Google Web Font in CSS file? - Stack Overflow
In bottom-left corner, a container titled "1 Family Selected" will appear. Click it, and it will expand. Use the "Customize" tab to select...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found