在开源项目的推文中,Cheng Lou 自称「曾经历了地狱般的挣扎」,带来的是「未来几年内 UI 工程中最重要的基础设施之一」,而且明确说 API 设计得「AI-friendly」,让 AI 编程助手能直接用。
Cheng Lou找到了一条「后门」:浏览器的canvas.measureText ()和DOM渲染,底层用的是同一套字体引擎。 那些曾经是CSS噩梦的挑战——自适应增高的文本域、折叠面板、多行文本居中、纯Canvas多行文本渲染,如今在Pretext面前,全成了不值一提的小儿科。
智东西3月31日消息,刚刚过去的周末,开源纯TypeScript库Pretext迅速引爆GitHub,至今Star数已飙升至2.47万,开发者的官宣推文浏览量已超2100万次,成为全球开发者社区焦点。 Pretext由前端大神、Midjourney前端工程师Cheng Lou重磅开源,仅几KB大小,渲染速度比传统工具快 ...
This was posted by the creator, Cheng Lou, himself on March 28, 2026. 'A fast, accurate, and comprehensive text measurement algorithm written in pure TypeScript.' 'Can be used for the layout of the ...
开源社区近日迎来一匹黑马——仅数KB大小的纯Typescript库Pretext,凭借其颠覆性的前端渲染性能迅速成为开发者热议焦点。这款由Midjourney前端工程师、React核心团队成员Cheng Lou主导开发的工具,在GitHub上线后迅速斩获2.47万Star,其官方推文浏览量突破2100万次,掀起 ...
Midjourney 工程师、前 React 核心团队成员 Cheng Lou 近期发布了 Pretext,这是一个仅 15KB 的开源 TypeScript 库,可以在不触及 DOM 的情况下完成文本测量与布局计算。这种方式避免了昂贵的浏览器布局重排(reflow),从而使无限列表、瀑布流布局以及滚动位置锚定等高级 ...
Unlock the full InfoQ experience by logging in! Stay updated with your favorite authors and topics, engage with content, and download exclusive resources. Dany Lepage discusses the architectural ...
Credit: VentureBeat made with Google Gemini 3.1 Pro Image For three decades, the web has existed in a state of architectural denial. It is a platform originally conceived to share static physics ...