-
Notifications
You must be signed in to change notification settings - Fork 501
Use new code font generally to fix Android monospace #1890
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
Conversation
I'd like it better if we could just use a google font instead of rehosting a widely used font |
Using Google fonts has some implications regarding data sharing. While the Google Fonts Privacy FAQ declares no data is used for profiling or targeted advertising. Despite that, there's a German court ruling that sharing an IP address with Google and consequently into the USA constitutes sharing of personal data into a different jurisdiction / loss of control/consent. The original benefits of CDNs often do not apply anyway. Different versions of fonts mean different websites will do their own requests. CDN delivery is often not or not significantly faster than delivering it directly. The font used here is not that popular on regular websites. And browsers have implemented resource isolation where fonts loaded from cross-origin are isolated to that context. What do you dislike about hosting it? |
Yeah sure, but please include the license of it:
|
Sounds good @Kissaki. Thanks for the info. I agree with @cptpiepmatz that if we can get that license in the code, I will land it. Appreciate the support. |
Using a specific font, and hosting it ourselves, allows us to ensure consistent behavior and a code font that covers the Nushell table border drawings characters. Adds FiraCode font, which is under OFL (SIL Open Font license). https://github.com/tonsky/FiraCode Introduces a 100 kb font file download, which should happen only once through adequate cashing.
e8029e9
to
447eeb8
Compare
Sorry for missing the LICENSE file. I have added it. |
Thanks |
Code blocks use a different variable, which this commit adds. On the current Nushell website, for example [Quick Tour][quicktour] page, we can see that the font-family being applied is in the generated style-*.css, with declaration `code { font-family(--code-font-family); }`, which does not match our supposed override which defines a var under a different name `--font-family-code`. This var name has been used since the introduction of the override in 83ced1d. Maybe vuepress changed the variable at some point? This is a follow-up to 2ec6143 (PR nushell#1890, PR nushell#1906), which attempts to solve Android monospace due to missing font coverage (nushell#83). Instead of replacing `--font-family-code`, `--code-font-family` is added as an additional value-identical declaration just in case the other variable is being used somewhere still. [quicktour]: https://www.nushell.sh/book/quick_tour.html#nushell-commands-output-data
Code blocks use a different variable, which this commit adds. On the current Nushell website, for example [Quick Tour][quicktour] page, we can see that the font-family being applied is in the generated style-*.css, with declaration `code { font-family(--code-font-family); }`, which does not match our supposed override which defines a var under a different name `--font-family-code`. This var name has been used since the introduction of the override in 83ced1d. Maybe vuepress changed the variable at some point? This is a follow-up to 2ec6143 (PR #1890, PR #1906), which attempts to solve Android monospace due to missing font coverage (#83). Instead of replacing `--font-family-code`, `--code-font-family` is added as an additional value-identical declaration just in case the other variable is being used somewhere still. [quicktour]: https://www.nushell.sh/book/quick_tour.html#nushell-commands-output-data
Using a specific font, and hosting it ourselves, allows us to ensure consistent behavior and a code font that covers the Nushell table border drawings characters.
Adds FiraCode font, which is under OFL (SIL Open Font license).
https://github.com/tonsky/FiraCode
Introduces a 100 kb font file download, which should happen only once through adequate cashing.
I can't test locally; if someone could do that, or we test it live.
Should resolve #83.