Github pages doesn't load font from google font correctly #64833
-
Select Topic AreaProduct Feedback BodyHello, I have a problem with my resume site on github page, I use the font Oswald from google font and it works fine locally but when I upload to github page, the font is switched to another one(I didn't specify an alternative font in the CSS). Please help. Best regards, Saidina |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
A few reasons why:
To fix this issue, you can try the following:
|
Beta Was this translation helpful? Give feedback.
-
I assume this is the file you are talking about - https://github.com/lee-pai-long/resume/blob/main/index.html Let's address the issue step by step:
The @import link for the Oswald font seems to be outdated or very specific. Typically, for Google Fonts, the link is more straightforward. You should go to Google Fonts, select Oswald, and then copy the provided link. It should look something like:
You mentioned that you didn't specify a fallback font. It's always a good practice to provide fallback fonts. This ensures that if the Oswald font fails to load, another similar font will be used. Modify your Oswald declaration as such:
If the issue persists after trying the above steps, you might want to check if other stylesheets or scripts are affecting the font rendering or if there's some conflict elsewhere in your CSS. |
Beta Was this translation helpful? Give feedback.
I assume this is the file you are talking about - https://github.com/lee-pai-long/resume/blob/main/index.html
Let's address the issue step by step:
The @import link for the Oswald font seems to be outdated or very specific. Typically, for Google Fonts, the link is more straightforward.
You should go to Google Fonts, select Oswald, and then copy the provided link. It should look something like:
You mentioned that you didn't specify a fallback font. It's always a good practice to provide fallback fonts. This ensures that if the Oswald font fails to load, another similar font …