Hacker GitHub

← All repos

chenglou/pretext

View on GitHub ↗ ★ 50,985 TypeScript

Fast, accurate & comprehensive text measurement & layout

13 mentions on Hacker News by 11 people: 4 stories, 9 comments · first 2026-03-28 · latest 2026-10-26

Mentions per year 13 mentions · busiest year 2026 (13)
20082026
  1. …justif and pretext for better typesetting and masonry columns https://github.com/lyallcooper/justif https://github.com/chenglou/pretext About 6 hours on Claude Code in two sessions.
    comment by niraj-agarwal · 2026-07-27 · in Paywall-free News Aggregator
  2. …to handle this efficiently? https://pretextjs.dev/pretext-demo/showcase-mesmerizing-anim... https://github.com/chenglou/pretext
    comment by hankbond · 2026-07-17 · in Just Do Things
  3. …Some claude came up with by itself and some were based on my guidance. You can see the result here: https://github.com/chenglou/pretext/issues/2 The original isCJK, also written by AI (I assume), was fast. It wasn't obviously slow like…
  4. …tomorrow. But until then, you can use the site to see all the potential buddies. Uses pretext ( https://github.com/chenglou/pretext ) for the text layout
    comment by open-paren · 2026-03-31 · in Claude Code Buddy Creator
  5. …do well. let's see how close pretext can get to 80ms (or better) without adopting the same tricks. https://github.com/chenglou/pretext/issues/18 there are already significant perf improvement PRs open right now, including one done using…
  6. …not, at some point I really want to understand what's the real insight in the library, their https://github.com/chenglou/pretext/blob/main/RESEARCH.md is interesting, they seem to have just done the hard work, of browser discrepancies to…
  7. …tests the resulting library against real browsers using a wide variety of long text documents, see https://github.com/chenglou/pretext/tree/main/corpora and https://github.com/chenglou/pretext/blob/main/pages/accuracy...
  8. That's in there too: https://github.com/chenglou/pretext/blob/53a065b8a345fc29831...
  9. …with pure arithmetic to count lines and compute height. Call on every resize. ~0.0002ms per text. https://github.com/chenglou/pretext/blob/main/src/layout.ts