Skip to content

docs: clarify custom font usage#367

Open
dicnunz wants to merge 2 commits into
zhravan:mainfrom
dicnunz:docs/custom-font-usage-119
Open

docs: clarify custom font usage#367
dicnunz wants to merge 2 commits into
zhravan:mainfrom
dicnunz:docs/custom-font-usage-119

Conversation

@dicnunz

@dicnunz dicnunz commented May 20, 2026

Copy link
Copy Markdown

Summary

  • clarifies that font selects bundled font keys and that the keys are case-sensitive
  • documents every current font key exported by src/fonts/fonts.js
  • adds combined query examples and contribution notes for adding future fonts

Fixes #119.

Checks

  • node docs coverage check against src/fonts/fonts.js
  • git diff --check

Optional: if this saves you time and you want to settle it as a small paid docs microfix, $5 works here: https://nicdunz.gumroad.com/l/tiny-codex-teardown-direct

Summary by CodeRabbit

  • Documentation
    • Clarified the font query parameter: case-sensitive bundled keys, how to combine with other query options, and example usage.
    • Added an "Available Fonts" list with standardized preview links and new bundled previews.
    • Added contributor guidance describing how to add and register new bundled fonts and include preview examples.

Review Change Stack

@vercel

vercel Bot commented May 20, 2026

Copy link
Copy Markdown

@dicnunz is attempting to deploy a commit to the shravan20's projects Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented May 20, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: e2bb8736-ad12-46ca-ac9b-98949d30b27c

📥 Commits

Reviewing files that changed from the base of the PR and between 51b27e4 and d6f6fdc.

📒 Files selected for processing (2)
  • README.md
  • src/fonts/README.md
✅ Files skipped from review due to trivial changes (1)
  • README.md

Walkthrough

Documentation is updated to explain the font query parameter usage, including case sensitivity, parameter composition, available bundled fonts, and contributor steps for adding new fonts. Changes span the main README and the dedicated fonts documentation file.

Changes

Font Parameter Documentation

Layer / File(s) Summary
Main README font parameter documentation
README.md
The "Fonts" section now documents font query parameter semantics (case-sensitive keys, composability with &), provides concrete examples, lists available fonts, and adds contributor instructions for registering new fonts in src/fonts/fonts.js, documenting in src/fonts/README.md, and including a preview link.
Fonts README usage and preview examples
src/fonts/README.md
The fonts-specific README expands the usage section with bundled font names, demonstrates ?font=FONT_NAME syntax and combining with other parameters via &font=..., includes registration instructions with stable parameter keys and preview examples, and updates preview links to consistently include &font=... in theme examples.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 I hopped through docs with a tiny quill,
Mapped fonts by name, and tuned each will,
Base64 tucked in a snug little den,
Now previews sing again and again,
Add a new font — the burrow's wide open! ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The PR documentation additions address #119's request to add docs about custom font usage, including workflow steps and examples, though no visual assets were added to the assets folder. Add promised images/snapshots to the assets folder as requested in issue #119's 'Additional context' section.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: clarifying documentation about custom font usage in both README files.
Out of Scope Changes check ✅ Passed All changes remain within scope: documentation updates to README.md and src/fonts/README.md explaining custom font usage, parameter behavior, and contribution workflow.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@README.md`:
- Around line 165-176: The README currently documents bundled fonts but does not
cover using a URL for custom fonts (the objective of issue `#119`); update the
README's font parameter section (the paragraph describing "font" and the
"Available Fonts" list) to include a short subsection showing how to provide a
remote font URL (example query param usage, expected URL format, and any
size/CORS constraints) plus one or two example image snapshots or links
demonstrating a custom-font URL in action, or if you do not want to add that
documentation now, remove the "Fixes `#119`" reference from the PR so the issue
remains open.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: fdad1d7a-9110-44e0-af48-ecc5e4127c0b

📥 Commits

Reviewing files that changed from the base of the PR and between bc57607 and 51b27e4.

📒 Files selected for processing (2)
  • README.md
  • src/fonts/README.md

Comment thread README.md
@dicnunz

dicnunz commented May 20, 2026

Copy link
Copy Markdown
Author

The Vercel failures here are owner/team authorization gates for preview deploys, not docs-build failures from this patch. Local proof for the docs change: I checked README.md / src/fonts/README.md against src/fonts/fonts.js and confirmed all six exported font keys are documented, then ran git diff --check clean. The change is docs-only.

@dicnunz

dicnunz commented May 22, 2026

Copy link
Copy Markdown
Author

Addressed the CodeRabbit docs gap on the latest push.

What changed:

  • Documented that the endpoint accepts registered font keys, not arbitrary remote font URLs in the query string.
  • Added the custom-font URL/feed workflow: start from a Google Fonts CSS URL, use it to find the font file, convert that file to embedded base64, register it in src/fonts/fonts.js, then use the registered key with ?font=FONT_NAME.
  • Added the same clarification to src/fonts/README.md with a preview URL users can copy.

Validation:

  • git diff --check

I kept this docs-only and did not claim unsupported remote-font URL loading behavior.

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.

[Feature Request] Missing Docs about using Custom Font

1 participant