Plans on weights?#21
Open
qlufiq-collab wants to merge 1 commit into
Open
Conversation
## Summary
Update the npm package entry point (`index.css`) and package manifest (`package.json`) to expose the full weight range (400–700) via the variable font. The previous configuration referenced a non-existent `fonts/webfonts/` directory and only declared a single static SemiBold (600) weight — a leftover from v1 before weights were added.
## Changes
- `index.css` — Replace the single-weight static `@font-face` with a variable font declaration using `font-weight: 400 700` range, sourcing from `fonts/calsans-var-full/CalSans-VariableFont.woff2` (with TTF fallback).
- `package.json` — Update `"files"` array to point to the actual variable font location (`fonts/calsans-var-full/`) instead of the non-existent `fonts/webfonts/` directory.
## Test Plan
- `python3 -c "import json; json.load(open('package.json'))"` → valid JSON, exits 0
- `file fonts/calsans-var-full/CalSans-VariableFont.woff2` → confirms WOFF2 font file exists
- Manual: consumers importing `cal-sans` now get all weights (Regular 400, Medium 500, SemiBold 600, Bold 700) through a single variable font file with `font-optical-sizing: auto` support
## Notes
The variable font includes all axes (`opsz`, `GEOM`, `wght`, `YTAS`, `SHRP`, `ital`), giving npm consumers access to the full design space — not just weight. The `font-weight: 400 700` range declaration enables the browser to use any weight in that range without additional `@font-face` rules.
Closes calcom#2
Bounty: calcom#2
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.
Summary
Update the npm package entry point (
index.css) and package manifest (package.json) to expose the full weight range (400–700) via the variable font. The previous configuration referenced a non-existentfonts/webfonts/directory and only declared a single static SemiBold (600) weight — a leftover from v1 before weights were added.Changes
index.css— Replace the single-weight static@font-facewith a variable font declaration usingfont-weight: 400 700range, sourcing fromfonts/calsans-var-full/CalSans-VariableFont.woff2(with TTF fallback).package.json— Update"files"array to point to the actual variable font location (fonts/calsans-var-full/) instead of the non-existentfonts/webfonts/directory.Test Plan
python3 -c "import json; json.load(open('package.json'))"→ valid JSON, exits 0file fonts/calsans-var-full/CalSans-VariableFont.woff2→ confirms WOFF2 font file existscal-sansnow get all weights (Regular 400, Medium 500, SemiBold 600, Bold 700) through a single variable font file withfont-optical-sizing: autosupportNotes
The variable font includes all axes (
opsz,GEOM,wght,YTAS,SHRP,ital), giving npm consumers access to the full design space — not just weight. Thefont-weight: 400 700range declaration enables the browser to use any weight in that range without additional@font-facerules.Closes #2