Repository navigation
fonts: add a system setting that skips Google Fonts - #4
Merged
Merged
Conversation
A new `fonts` setting (and spec field) takes `google` (default, unchanged) or `system`. With `system` the page and the folder index leave the Google Fonts stylesheet and preconnects out, so a generated diagram references no other host, and SVG export makes no font request.
Contributor
Author
|
Thanks a lot for merging this so quickly, and for SeeCode in general! I use it alongside Archify in my own diagram skill, and the system font switch means I can hand the HTML files to customers who must not load anything from third-party servers. If something else comes up, I'll open an issue first, as CONTRIBUTING.md asks. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #3
Why
I use SeeCode for architecture diagrams that end up in customer documentation. Some of those environments do not allow pages that call third-party hosts, and under GDPR a page that loads Google Fonts sends the viewer's IP address to Google. PRIVACY.md is upfront about this, but there is currently no way to turn it off.
What
A new
fontssetting, also available as a spec field:google(default): nothing changes.system: the page and the folder index leave out the Google Fonts stylesheet and the preconnects. The font stacks stay, so the system fallbacks apply. SVG export then makes no font request.node skills/seecode/scripts/seecode.mjs config set fonts systemNot in this PR
Checks
npm test: 231 passed, 1 skipped (Windows 11, Node 24)node tools/check-version-unchanged.mjs origin/main: oktest/fonts.test.mjs: default unchanged, no externalsrc/hrefwithsystem(spec and setting, sketchy style, folder index), SVG export without a fetch, config rejects unknown values.settings.md,spec.md,PRIVACY.mdand the README line on fonts are updated.No screenshots regenerated, the default look is unchanged.