# pretext changelog > Fast, accurate and comprehensive text measurement and layout. - Vendor: chenglou - Category: Frameworks & Libraries - Official site: http://chenglou.me/pretext/ - Tracked by: What's New (https://whatsnew.fyi/product/pretext) - Harvested from: Blog (https://github.com/chenglou/pretext/tags.atom) - Entries below: 5 (newest first) What's New is an index, not a publisher: every entry below links to the vendor's own release notes, which are the authoritative source. Entries are labelled where they are hand-curated sample data, pre-releases, or drawn from a secondary source such as a developer blog. ## Releases ### v0.0.8 — v0.0.8: Release 0.0.8 - Date: 2026-06-12 - Version: v0.0.8 - Original notes: https://github.com/chenglou/pretext/releases/tag/v0.0.8 - Permalink: https://whatsnew.fyi/product/pretext/releases/v0.0.8 Release 0.0.8 Co-Authored-By: Claude Fable 5 - **added** — The published package now ships declaration maps, so editor go-to-definition and programmatic TypeScript source tracing land in the shipped .ts source instead of the .d.ts files - **fixed** — Word-internal keyboard and Unicode symbol runs in long words now stay with surrounding text the way browsers break them, while browser-break symbols stay breakable - **fixed** — Overlong hyphenated runs now prefer browser-like dash breakpoints before falling back to emergency grapheme breaks ###### Added - The published package now ships declaration maps, so editor go-to-definition and programmatic TypeScript source tracing land in the shipped `.ts` source instead of the `.d.ts` files. ###### Fixed - Word-internal keyboard and Unicode symbol runs in long words now stay with surrounding text the way browsers break them, while browser-break symbols stay breakable (#169). - Overlong hyphenated runs now prefer browser-like dash breakpoints before falling back to emergency grapheme breaks (#89). ### v0.0.7 - Date: 2026-05-10 - Version: v0.0.7 - Original notes: https://github.com/chenglou/pretext/releases/tag/v0.0.7 - Permalink: https://whatsnew.fyi/product/pretext/releases/v0.0.7 - **changed** — The package now declares itself side-effect-free so bundlers can tree-shake unused entrypoints - **changed** — layoutNextLine() and layoutNextLineRange() now avoid redundant chunk lookup in chunk-heavy manual layout paths - **fixed** — { wordBreak: 'keep-all' } now handles no-space mixed Latin, numeric, and CJK text more like browsers - **fixed** — No-space punctuation chains now stay together for non-ASCII word-like text too, instead of only ASCII words - **fixed** — Opening punctuation such as ¡, ¿, German low quotes, and ⸘ now stays with the following word instead of dangling at line end - **fixed** — Numeric prefix/postfix symbols like $, %, €, +, −, and ° now stay attached to adjacent text the way browser line breaking does - **fixed** — Soft-hyphen breaks now stay at the soft-hyphen insertion point instead of pulling post-hyphen graphemes onto the broken line - **fixed** — Line geometry now preserves browser-style terminal letter spacing, including rich-inline item boundaries and visible soft-hyphen breaks - **fixed** — Rich-inline item boundaries no longer overflow the requested width after a forced-progress break - **fixed** — The markdown chat demo now drops parsed link URLs unless they resolve to HTTP(S) hrefs ###### Changed - The package now declares itself side-effect-free so bundlers can tree-shake unused entrypoints (#160). - `layoutNextLine()` and `layoutNextLineRange()` now avoid redundant chunk lookup in chunk-heavy manual layout paths (#140). ###### Fixed - `{ wordBreak: 'keep-all' }` now handles no-space mixed Latin, numeric, and CJK text more like browsers. - No-space punctuation chains now stay together for non-ASCII word-like text too, instead of only ASCII words. - Opening punctuation such as `¡`, `¿`, German low quotes, and `⸘` now stays with the following word instead of dangling at line end (#165). - Numeric prefix/postfix symbols like `$`, `%`, `€`, `+`, `−`, and `°` now stay attached to adjacent text the way browser line breaking does (#105). - Soft-hyphen breaks now stay at the soft-hyphen insertion point instead of pulling post-hyphen graphemes onto the broken line (#162). - Line geometry now preserves browser-style terminal letter spacing, including rich-inline item boundaries and visible soft-hyphen breaks (#171). - Rich-inline item boundaries no longer overflow the requested width after a forced-progress break (#132). - The markdown chat demo now drops parsed link URLs unless they resolve to HTTP(S) hrefs (#168). ### v0.0.6 - Date: 2026-04-22 - Version: v0.0.6 - Original notes: https://github.com/chenglou/pretext/releases/tag/v0.0.6 - Permalink: https://whatsnew.fyi/product/pretext/releases/v0.0.6 - **added** — Numeric CSS-pixel letterSpacing support on prepare(), prepareWithSegments(), and each existing rich-inline item - **fixed** — CJK text followed by opening bracket annotations now wraps like browsers instead of leaving the opening bracket on the previous line ###### Added - Numeric CSS-pixel `letterSpacing` support on `prepare()`, `prepareWithSegments()`, and each existing rich-inline item (#108, #156). ###### Fixed - CJK text followed by opening bracket annotations now wraps like browsers instead of leaving the opening bracket on the previous line (#148). ### v0.0.5 - Date: 2026-04-08 - Version: v0.0.5 - Original notes: https://github.com/chenglou/pretext/releases/tag/v0.0.5 - Permalink: https://whatsnew.fyi/product/pretext/releases/v0.0.5 - **added** — Add geometry-first rich line helpers for manual layout work: measureLineStats(), measureNaturalWidth(), layoutNextLineRange(), and materializeLineRange() - **added** — Add @chenglou/pretext/rich-inline, a narrow helper for inline-only rich text, mentions/chips, and browser-like boundary whitespace collapse - **added** — Add { wordBreak: 'keep-all' } support on prepare() / prepareWithSegments() for CJK and Hangul text - **added** — Add a virtualized markdown chat demo for rich inline text and pre-wrap layout - **changed** — Make prepare-time analysis more resilient on long mixed-script, CJK, Arabic, repeated-punctuation, and other degenerate inputs - **fixed** — Fix mixed CJK-plus-numeric runs, keep-all mixed-script boundaries, and long breakable runs to stay closer to browser behavior - **fixed** — Fix rich-path bidi metadata and CJK detection to handle the relevant astral Unicode ranges correctly ###### Added - Geometry-first rich line helpers for manual layout work: `measureLineStats()`, `measureNaturalWidth()`, `layoutNextLineRange()`, and `materializeLineRange()`. - `@chenglou/pretext/rich-inline`, a narrow helper for inline-only rich text, mentions/chips, and browser-like boundary whitespace collapse. - `{ wordBreak: 'keep-all' }` support on `prepare()` / `prepareWithSegments()` for CJK and Hangul text. - A virtualized markdown chat demo for rich inline text and `pre-wrap` layout. ###### Changed - Prepare-time analysis is more resilient on long mixed-script, CJK, Arabic, repeated-punctuation, and other degenerate inputs. ###### Fixed - Mixed CJK-plus-numeric runs, keep-all mixed-script boundaries, and long breakable runs now stay closer to browser behavior. - Rich-path bidi metadata and CJK detection now handle the relevant astral Unicode ranges correctly. ### v0.0.4 - Date: 2026-04-01 - Version: v0.0.4 - Original notes: https://github.com/chenglou/pretext/releases/tag/v0.0.4 - Permalink: https://whatsnew.fyi/product/pretext/releases/v0.0.4 - **added** — A justification comparison demo that shows native CSS justification, greedy hyphenation, and a Knuth-Plass-style paragraph layout side by side - **changed** — Rich layout is faster on chunk-heavy and long-breakable text - **fixed** — layout(), layoutWithLines(), and layoutNextLine() stay aligned on narrow ZWSP / grapheme-breaking edge cases - **fixed** — The justification comparison demo no longer paints justified lines wider than their column ###### Added - A justification comparison demo that shows native CSS justification, greedy hyphenation, and a Knuth-Plass-style paragraph layout side by side. ###### Changed - Rich layout is faster on chunk-heavy and long-breakable text. ###### Fixed - `layout()`, `layoutWithLines()`, and `layoutNextLine()` stay aligned on narrow `ZWSP` / grapheme-breaking edge cases. - The justification comparison demo no longer paints justified lines wider than their column.