-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
README Font not Loading? #1
Comments
Thanks for reporting this. I wonder if this is due to setting on your machine. It works on my Windows machine(s) (desktop and laptop). I should probably add a fallback font. |
It's possible. Though I tested on Linux, and the Windows example was tested by a friend on their device. I just made my partner test this on her Windows machine using Chrome, and it also looks as above. I assume this may be because you have the Hack font installed locally, so it can be found even if loading the external resource fails? Or if that's not the case, then I'm not sure what's wrong, but regardless what you suggested with the fallback ( |
That is indeed why it works on my machine :) The font is indeed installed on my machine. Will need to figure out if I can load an external font and otherwise I will switch to another font. |
I have moved part the external css to the file. Still works on my machine. Does it now also work on yours? Will add a fallback font in another commit. edit: And of course I was testing with the |
I've found a way to load an external font if you're really into it. Now that you've moved to a @font-face {
font-family: 'test';
src: url('data:application/font-woff2;charset=utf-8;base64,...') format('woff2');
font-weight: 400;
font-style: normal;
} |
Updated the file to use the base64 encoded version of the font that you provided. Thanks for your help. |
I'll close the issue then. It looks good everywhere except when served from Probably still worth adding fallback fonts, namely
|
Thanks again 👍 Fallback font has been added. |
On Firefox, the bottom gets cropped off, and in all user-agent it behaves as if the "Hack" typeface isn't available.
I think it's because of GitHub's Content Security Policy:
default-src 'none'; style-src 'unsafe-inline'; sandbox
style-src
is set tounsafe-inline
, would disallow loading external styles.default-src
is set tonone
, sincefont-src
hasn't been set explicitly, it's implicitly set tonone
which would disallow@font-face
.Linux / Firefox
Linux / Chromium
Windows / Chrome
The text was updated successfully, but these errors were encountered: