docs: propose modernizing user guide typography #10133
All Vouch review confidence checks passed
Residual risk 0.33 = Change Risk (0.59) × (1 − Review Confidence (0.45)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.59 · 650 lines diff across 8 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.388
Shallow Review Depth
shallow_review_depth
0.344
Real PR Conversation Timeline
1 comments
"Review active on #10133"
general
weight: 0.35
neznaika0
<!--
Each pull request should address a single issue and have a meaningful title.
-->
Description
Background
The user guide currently bundles Raleway locally (6
@font-faceblocks inuser_guide_src/source/_static/css/citheme.css, and 30 font files totaling ~1.1 MB underuser_guide_src/source/_static/fonts/Raleway/). That setup dates to February 2020, commita57d141("Change font to 'Raleway' (CI's 'official' font)"), followed by a short stabilization series ending with80ec0c0. It has not been revisited in ~6 years.Verified that
codeigniter4projects/websitecurrently ships the identical Raleway bundle inpublic/assets/css/ci-theme.css— same 6 variants (200/400/700 × normal/italic), same legacy formats. So brand alignment between the docs and the marketing site today is real and deliberate. Any serious proposal to change the user guide font therefore needs to either (a) keep it aligned with the website, or (b) change both together.Why re-open the question
Three reasons to revisit the 2020 choice, independent of which font ends up winning:
1. Raleway is a display typeface — not optimized for long-form reading. Designed by Matt McInerney in 2010 as a single ExtraLight weight for headlines, later expanded into a family. The bundled 200 weight in particular renders thin and low-contrast on modern high-DPI displays at body sizes. Readers going through long API reference pages aren't getting the best legibility we could offer.
2. The local bundle ships formats for browsers that no longer exist. The 30 files include
.eot(IE 6–9 — Microsoft retired IE in June 2022) and.svgfonts (pre-iOS 4.2 Safari). Modern browsers all use.woff2. The legacy formats are dead weight in every clone, CI job, and release.3. Code blocks have no intentional font. The RTD theme falls back to
SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", ..., so readers on macOS, Windows, and Linux each see a different monospace — no consistency, no programming ligatures, no deliberate choice. This is independent of the brand-font question and is probably the single biggest readability win available.Proposal (full)
Body + headings: Inter — a neutral sans-serif designed specifically for UI and on-screen reading by Rasmus Andersson (ex-Figma, ex-Spotify), SIL OFL-licensed. It's become the de facto choice for modern technical documentation (Tailwind, Vercel, Laravel, GitHub's design system). Much better legibility at body sizes than a display sans like Raleway. Reasonable alternatives worth discussing: Source Sans 3, IBM Plex Sans, Work Sans. The point isn't "Inter is the only right answer," it's "a purpose-built reading sans fits the docs better than a display sans."
Code: JetBrains Mono — with OpenType
caltligatures enabled (renders=>,!=,->,<=,>=,===,!==as single glyphs in PHP samples). SIL OFL. Alternatives: Fira Code, Cascadia Code, Source Code Pro.Delivery: self-hosted
.woff2(updated per @neznaika0's review feedback — previously proposed via Google Fonts, then Bunny Fonts CDN). 10 latin-subset.woff2files totaling ~252 KB, underuser_guide_src/source/_static/fonts/Inter/(6 variants) anduser_guide_src/source/_static/fonts/JetBrainsMono/(4 variants). Each@font-facedeclaresunicode-rangefor the latin subset so glyphs outside the range fall back cleanly to system fonts, and usesfont-display: swapso text paints immediately with the fallback stack rather than blocking. Still a significant reduction from the original Raleway bundle (~1.1 MB across 30 legacy-format files) despite gaining a monospace family.Coordinated change
For consistency with the marketing site, a matching PR would be opened at
codeigniter4projects/websitetouchingpublic/assets/css/ci-theme.cssandpublic/assets/fonts/. I'll open that once there's signal here — no point in a two-repo change if the answer on this one is "no."Plan B (if a full brand change isn't on the table)
If the CodeIgniter Foundation wants to preserve Raleway for brand consistency, I'd narrow this PR to the code-block-only improvements:
<pre>and<code>self-hosted as.woff2— no brand conflict, high dev-facing value..rst-content div[class^=highlight] pre,.rst-content pre.literal-block,.rst-content .linenodiv pre) so the chosen font wins the cascade over the RTD theme's fallbacks..eotand.svgfiles from the Raleway bundle (~400 KB cleanup for dead-browser formats, no visible change on any supported browser).Plan B is mergeable on its own merits and doesn't depend on brand-level decisions. Happy to split it out as a separate, smaller PR if preferred.
What this PR currently changes (full-proposal version)
user_guide_src/source/_static/css/citheme.css- Replaced 6 local Raleway
@font-faceblocks with 10 local@font-faceblocks for Inter (6 variants) + JetBrains Mono (4 variants), sourcing.woff2only (no legacy.eot/.svg/.ttf/.woff). Each block declaresunicode-rangefor the latin subset andfont-display: swap.- Updated
body/p/legend/h1–h6font-familyfrom"Raleway", ...to"Inter", ....- Added a monospace rule targeting RTD's high-specificity selectors so JetBrains Mono wins the cascade on syntax-highlighted blocks.
- Added
font-feature-settings: "calt" 1;to make ligature intent explicit.user_guide_src/source/_static/fonts/Raleway/— deleted (30 files, ~1.1 MB).user_guide_src/source/_static/fonts/Inter/— added (6.woff2files, ~148 KB).user_guide_src/source/_static/fonts/JetBrainsMono/— added (4.woff2files, ~88 KB).Questions for maintainers
1. Is Raleway still considered the project's brand typeface? If yes, is the Foundation open to revisiting that? (Decisive question — everything downstream hangs on it.)
2. ~~Is there a preference for self-hosted fonts over a Google Fonts CDN dependency?~~ Addressed — self-hosted after @neznaika0 raised CDN-reachability concerns in review. Files ship as latin-subset
.woff2underuser_guide_src/source/_static/fonts/.3. Would a coordinated PR at
codeigniter4projects/websitebe welcome, or is that repo's typography considered separate?4. If the full change isn't on the table, is Plan B (code font only) acceptable as a standalone PR?
---
<sub>_Drafted with assistance from Claude (Anthropic). All factual claims verified against primary sources._</sub>
Checklist: