Show HN: Sidebearing-trim – align text to visible ink, not the glyph box
Category: library
Tags: typography, text-alignment, opentype, react, typescript, css
Score: 6.8/10 (Innovation: 7, Technical: 7, Documentation: 7, Utility: 6)
Sidebearing-trim is a TypeScript library that aligns text by its visible ink rather than the glyph box, using OpenType metrics to measure and shift line-start glyphs. It offers a unique approach to optical text alignment for the web, with both vanilla JS and React APIs, filling a specific niche in typography and frontend development.
Target audience: frontend devs
Repository: https://sidebearing-trim.js.org/ · TypeScript · 4 stars
View on Hacker News