Sc

Scrawl-canvas – a new text layout engine

Hacker News

Scrawl-canvas – a new text layout engine

I've spent the last 4 months ripping out my canvas library's text layout engine and replacing it with something entirely new. This work has led me on an adventure of discovery around how various languages choose to record their sounds in fonts (why, Thai? Just ... why??) and the various (nefarious!) approaches browsers use to layout those fonts in web pages. The new engine: - Handles horizontal (ltr and rtl) and vertical fonts, with justify options. - Styling text (underlines, overlines, highlights) is done with the help of HTML/CSS markup in the text, and can include gradients and patterns as well as any CSS color string. - Text can be fitted into template shapes, or along a path. This is a bit like the CSS shape-inside property[1] (currently not supported widely by browsers). - With a bit of extra work, text can be selected/copied - even text-along-a-path. (Though I'm determined not to be tricked into creating a text editor demo for this sort of thing!) This is an MVP release. If anyone sees glitches, errors or improvements please let me know. Also: enjoy! [1] - see the "Creative text flows using CSS shapes" article on LogRocket - https://blog.logrocket.com/creative-text-flows-using-css-sha...

Share card

Actual performance

2points
Did not reach leaderboard

Launch Intel predictions

Analyze your own launch →
Product HuntOn track for Day 1 leaderboard · Strong signals: new, using · Missing: mac, agents, macos
74%74% predicted probability of success on Product Hunt, based on ML models trained on real launch data.
best fitHighest predicted score across all platforms for this description.
Hacker NewsStrong engagement from HN community · Strong signals: ide, io · Missing: https docs, excited, just released
58%58% predicted probability of success on Hacker News, based on ML models trained on real launch data.
nativeThis product was originally launched on this platform.
Indie HackersFits the IH revenue-focused audience · Missing: supports, reddit linkedin, podcasting
53%53% predicted probability of success on Indie Hackers, based on ML models trained on real launch data.
TrustMRRLess likely to generate early MRR · Strong signals: month · Missing: mobile apps, ios, personal
45%45% predicted probability of success on TrustMRR, based on ML models trained on real launch data.
AppSumoMay struggle as an AppSumo deal · Missing: plus, platform, intuitive
43%43% predicted probability of success on AppSumo, based on ML models trained on real launch data.
Acquire.comPre-revenue stage for this audience · Missing: arr, mrr, revenue
23%23% predicted probability of success on Acquire.com, based on ML models trained on real launch data.
BetaListMay not resonate with beta-testers · Missing: web3, chat, crypto
1%1% predicted probability of success on BetaList, based on ML models trained on real launch data.

Incorrect prediction on native model

Similar products

Dr
Dropflow, a CSS layout engine for node or <canvas>74%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Dropflow, a CSS layout engine for node or <canvas>

Hacker News404
Hana by Spline
Hana by Spline87%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

A new canvas for interactivity

Product Hunt+238Design Tools
Mu
Multiline Text in HTML5 Canvas63%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Multiline Text in HTML5 Canvas

Hacker News1
HT
HTML5 Canvas Document Layout / Text Editor66%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

HTML5 Canvas Document Layout / Text Editor

Hacker News1
Ai
Aina, a templating engine for the new milenium45%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Aina, a templating engine for the new milenium

Hacker News1
My
My proposal for a new keyboard layout40%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

My proposal for a new keyboard layout

Hacker News156
Su
SunCycle – Sublime Text layout switch based on sunrise/sunset49%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

SunCycle – Sublime Text layout switch based on sunrise/sunset

Hacker News1
Fi
Fix for the new Twitter layout43%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Fix for the new Twitter layout

Hacker News1
Gp
Gpt4-o is the new game engine59%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Gpt4-o is the new game engine

Hacker News5
HT
HTML5 Photobooth thingy made with Camvas (webcam to canvas)76%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

HTML5 Photobooth thingy made with Camvas (webcam to canvas)

Hacker News2