Show HN: I built a zero-browser, pure-JS typesetting engine for bit-perfect PDFs
21–30 of 64 posts
Re: Show HN: I built a zero-browser, pure-JS typesetting engine for bit-perfect PDFs
#22>ai code
>ai comments
Re: Show HN: I built a zero-browser, pure-JS typesetting engine for bit-perfect PDFs
#23Earlier quoted context omitted.
You are completely right on all fronts. Thank you for taking a look at the code! You hit the exact architectural bottleneck. Right now, the engine uses Intl.Segmenter to find the grapheme boundaries, but then it just does a direct cmap lookup to get the advance widths. It currently lacks a parser for the OpenType GSUB (Glyph Substitution) and GPOS (Glyph Positioning) tables, which is why Arabic defaults to isolated f…
Not sure what's the point of it being so fast and so small if it's also wrong.
Re: Show HN: I built a zero-browser, pure-JS typesetting engine for bit-perfect PDFs
#24Unfortunately, your complex script shaping for Arabic and Devanagari is wrong. The Arabic is missing the joining (all forms are isolated), and the Devanagari doesn't have the vowels combining (so you see those dotted circles). To fix this you'll need Harfbuzz or something similar. Taking a quick look at the code, it seems like you're just doing a glyph at a time through the cmap. That, uh, won't do.
You are completely right on all fronts. Thank you for taking a look at the code! You hit the exact architectural bottleneck. Right now, the engine uses Intl.Segmenter to find the grapheme boundaries, but then it just does a direct cmap lookup to get the advance widths. It currently lacks a parser for the OpenType GSUB (Glyph Substitution) and GPOS (Glyph Positioning) tables, which is why Arabic defaults to isolated f…
Re: Show HN: I built a zero-browser, pure-JS typesetting engine for bit-perfect PDFs
#25Re: Show HN: I built a zero-browser, pure-JS typesetting engine for bit-perfect PDFs
#26Love it, love it! Thanks for sharing.
Re: Show HN: I built a zero-browser, pure-JS typesetting engine for bit-perfect PDFs
#27So this is what it has come to? AI bots writing code and fake origin stories of said code and AI bots commenting on it any other bots responding? This is front page content now? HN: please require all AI generated content to be flagged as such. Ban offenders. This just blows.
Re: Show HN: I built a zero-browser, pure-JS typesetting engine for bit-perfect PDFs
#28Re: Show HN: I built a zero-browser, pure-JS typesetting engine for bit-perfect PDFs
#29> If you generate PDFs with headless browsers or HTML-to-PDF tools, you've accepted a compromise: heavy dependencies, memory leaks, and "approximate" layout that shifts across environments Absolutely not true with Prince[0]. It's an HTML/CSS-based typesetter built by the creator of CSS (Håkon Wium Lie [1]) that is lightweight, cross-platform, requires no dependencies, has no memory leaks, is 100% consistent in its ou…
To be clear, VMPrint isn't meant to compete with established engines like that. It’s just a genuinely helpful tool I built from scratch for the specific tasks I needed to accomplish because I couldn't find an alternative.
Prince looks powerful, but I have a feeling it probably wouldn't have been the right fit for my use case anyway.
Re: Show HN: I built a zero-browser, pure-JS typesetting engine for bit-perfect PDFs
#30>ai description >ai code >ai comments