Si

Sidebearing-trim – align text to visible ink, not the glyph box

Hacker News

Sidebearing-trim – align text to visible ink, not the glyph box

Ahoy HN! I'm sure most of you have at least subconsciously noticed that when aligning heading to a layout edge or another element, text always appears slightly indented. This is indistinguishable on smaller font sizes, but starts to be noticeable especially on bigger sans-serif font sizes. This has been discussed in the internet without any proper solutions. There's even a W3C CSS proposal from 2014 for "font-side-bearings: trimmed" that has remained stale. https://lists.w3.org/Archives/Public/www-style/2014Jan/0242.... This npm-package 'sidebearing-trim' fixes the issue. By extracting .woff font metrics we're detecting starting characters of the visual lines and shift each row by exactly the sidebearing value of its first glyph. This is my first npm package so please expect it to be still rough around the edges. Happy to hear your feedback!

Share card

Actual performance

2points
1comments
Did not reach leaderboard

Launch Intel predictions

Analyze your own launch →
Indie HackersFits the IH revenue-focused audience · Missing: supports, reddit linkedin, podcasting
58%58% predicted probability of success on Indie Hackers, based on ML models trained on real launch data.
best fitHighest predicted score across all platforms for this description.
Hacker NewsMay not resonate with HN audience · Strong signals: ide, io · Missing: https docs, excited, just released
49%49% predicted probability of success on Hacker News, based on ML models trained on real launch data.
nativeThis product was originally launched on this platform.
TrustMRRLess likely to generate early MRR · Strong signals: way · Missing: mobile apps, ios, personal
43%43% 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
35%35% predicted probability of success on AppSumo, based on ML models trained on real launch data.
Product HuntUnlikely to reach the leaderboard · Strong signals: visual · Missing: mac, agents, macos
34%34% predicted probability of success on Product Hunt, based on ML models trained on real launch data.
Acquire.comPre-revenue stage for this audience · Missing: arr, mrr, revenue
20%20% 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
8%8% predicted probability of success on BetaList, based on ML models trained on real launch data.

Correct prediction on native model

Similar products

Ou
Out-of-the-box text classification models45%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Out-of-the-box text classification models

Hacker News20
CBlocks
CBlocks

A Mystery box for cryptocurrencies

BetaList
CS
CSS3 Fancy Box50%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

CSS3 Fancy Box

Hacker News4
Ho
Homeschool in a Box48%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Homeschool in a Box

Hacker News2
jq
jquery-select-box47%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

jquery-select-box

Hacker News2
Va
Vagrant Box for Ubuntu14 Trusty HHVM48%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Vagrant Box for Ubuntu14 Trusty HHVM

Hacker News1
Labubu Box
Labubu Box19%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Labubu Box

Indie Hackers
Bo
Box-n-Weave.js – 0-dependency text-to-diagramming lib (16kb gzipped)60%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Box-n-Weave.js – 0-dependency text-to-diagramming lib (16kb gzipped)

Hacker News1
Dr
Dropping SynthID from 188/192 to 0/192 without changing visible text42%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Dropping SynthID from 188/192 to 0/192 without changing visible text

Hacker News5
In
Ink for iOS54%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Ink for iOS

Hacker News31