logoalt Hacker News

Mobeen0119today at 5:53 AM2 repliesview on HN

Since everything is offline, what ended up being the hardest format to support while keeping rendering faithful?


Replies

mokshablrtoday at 11:26 AM

pptx by a mile. A slide is absolutely positioned shapes with a whole layout inheritance thing going on so the JS renderer ends up reimplementing a whole layout engine, and it gets you to "approximately right" and stops there. Charts I gave up on.

docx was annoying in a different way. Bullets came out as junk characters for a while and I couldnt work out why. I then found that Word writes them as private use area codepoints in the Symbol font so unless you have that exact font you get some junk. I just map them back to unicode after the render.

xlsx was the easy one, SheetJS does the hard part.

On faithful though none of this is faithful the way LibreOffice is. Its more that "you can read the document and it looks roughly right" which is what I wanted out of an app of 14MB.

vrightertoday at 7:11 AM

Why would rendering a document need internet access?

show 2 replies