Repository navigation
v0.4.1 — fix: fit scaling no longer shrinks type below legible sizes
A patch release fixing a font-legibility regression in 0.4.0's new
fit-to-container layout, plus documentation and examples work.
🔤 Fixed: fit scaling could shrink type to illegible sizes
0.4.0 taught the packer to fit an externally sized container by scaling the
whole font ramp. It scaled in both directions, though — down to ×0.5 — so a
dense cloud in a small box was crammed at unreadable sizes instead of
overflowing at normal ones, a regression from 0.4.0's predecessors.
Fit scaling is now grow-only, clamped to ×1–×2.5:
- a container with room still gets maximized type, which was the point of the
feature - a container too small for the tags at their base sizes now overflows
it — legibility wins over fit, matching pre-0.4.0 behavior - overflow retries floor at ×1 and stop early once they reach it
minPx/maxPx therefore act as the relative ramp and a genuine floor, not
merely a starting point. Pinned by a regression test: 80 tags in a 600×250 box,
asserting zero tags render below their base ramp size and that the cloud
overflows rather than crams.
📖 Docs & examples
- README install instructions — a per-package
npm installcommand for all
seven packages, plus the CDN script-tag alternative, and each framework quick
start now leads with its own install line. - Live examples site leads with the
frameworks — the "One engine, every framework" cloud is now the first card
(with a matching nav chip), and each framework tag links straight to its npm
package. - The Sizing section documents the grow-only fit behavior.
Install
npm install opentagcloud # Svelte 5 + vanilla mount() + <otc-tag-cloud>
npm install @opentagcloud/react # or /vue, /angular, /solid, /next, /coreFull changelog: v0.4.0...v0.4.1