News for hackers. Stuff that matters.

peksi

Glad to know that I'm not alone with this problem!

I'm using opentype.js to parse the font. This happens without the browser renderer, so it's not affected by the CSS font state.

( For solely rendered font manipulation there's also 'await document.fonts.ready' which resolves once the document has loaded the fonts

https://developer.mozilla.org/en-US/docs/Web/API/FontFaceSet... )

Edit: Didn't read the question fully on the first go

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

https://sidebearing-trim.js.org/

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...

( Read More... | 2 comments | on HN )