Skip to content
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

Replace Google Fonts #8084

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

gardenrobot
Copy link

@gardenrobot gardenrobot commented Sep 1, 2023

This PR removes Google Fonts (from this issue) and bundles the used fonts (Ubuntu and Google's Open Sans distribution) into the repo. This makes Nightscout useable if access if Fonts is interrupted.

I took care to make sure there is no change to appearance. The only change is the italicized text in /admin. It now uses the italic font instead of slanting the normal font.

before:
before

after:
after

The woff2 files cache, and I have not found a noticable difference in load time.

Licensing

Both fonts allow distribution in open source projects:

https://github.com/googlefonts/opensans/blob/main/OFL.txt

The OFL allows the licensed fonts to be used, studied, modified and redistributed freely as long as they are not sold by themselves. The fonts, including any derivative works, can be bundled, embedded, redistributed and/or sold with any software provided that any reserved names are not used by derivative works. The fonts and derivatives, however, cannot be released under any other type of license. The requirement for fonts to remain under this license does not apply to any document created using the fonts or their derivatives.

https://ubuntu.com/legal/font-licence

This licence allows the licensed fonts to be used, studied, modified and redistributed freely. The fonts, including any derivative works, can be bundled, embedded, and redistributed provided the terms of this licence are met. The fonts and derivatives, however, cannot be released under any other licence. The requirement for fonts to remain under this licence does not require any document created using the fonts or their derivatives to be published under this licence, as long as the primary purpose of the document is not to be a vehicle for the distribution of the fonts.

@@ -4,7 +4,6 @@
<head>
<meta charset="UTF-8">
<title>Swagger UI: Nightscout API</title>
<link href="https://fonts.googleapis.com/css?family=Open+Sans:400,700|Source+Code+Pro:300,600|Titillium+Web:400,600,700" rel="stylesheet">
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I can tell, this isn't used

@t1diotac
Copy link

t1diotac commented Mar 9, 2024

I self host NightScout with Podman, and I have tablets that display the clock view which are on a separate isolated network. This is an excellent change that makes it so devices on those isolated networks don't need any firewall exceptions for Google Font API servers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants