Show HN: Render-tag – A rich text renderer for the Canvas 2D API
Category: library
Tags: canvas, rich-text, html-rendering
Score: 7.3/10 (Innovation: 6, Technical: 8, Documentation: 8, Utility: 7)
Render-tag is a TypeScript library that renders HTML rich text onto Canvas 2D using pure drawing primitives, avoiding slow SVG foreignObject approaches. It parses HTML, resolves CSS, and performs layout and drawing with canvas APIs, offering significant performance gains for canvas-based design editors and image export tools. The project stands out for its Chrome-first, cross-browser consistent strategy and its separation of layout and draw phases for efficient reuse.
Target audience: frontend devs
Repository: https://github.com/polotno-project/render-tag · TypeScript · 85 stars
View on Hacker News