[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [groff] Now online: gropdf / grops previewer
From: |
G. Branden Robinson |
Subject: |
Re: [groff] Now online: gropdf / grops previewer |
Date: |
Sun, 22 Apr 2018 19:34:20 -0400 |
User-agent: |
NeoMutt/20170113 (1.7.2) |
At 2018-04-23T09:04:25+1000, John Gardner wrote:
> Well, here it is:
>
> https://rawgit.com/Alhadis/Roff.js/web-demo/index.html
>
> Some modifications were needed for web-delivery, and performance still
> isn't optimal, but it works. You'll need a relatively recent browser to use
> it (anything released within the last year should do).
>
> Few things to note before you try it:
This looks fantastic! Thank you for doing this work!
I'd love to see what the source looks like, but when I alter the URL, I
get a bunch of 404s.
> - *Some fonts may look different.* Browsers handle font-rendering, which
> means the base 35 PDF fonts won't be visible in the renderer unless they've
> also been installed in your system's usual fonts directory.
I found a possible Unicode handling problem. In the attached ditroff
output, note that the angle brackets around the email address in the
"AUTHORS" section are rendered as different glyphs altogether.
> - *There's an issue with zooming.* This is what I'm stuck on, and when
> Branden offered help with matrix calculations, I decided the best way of
> explaining was with a working demo.
>
> If you zoom in using the *100%* menu, you'll notice you can't scroll
> left or upwards. That's because the page contents extend past the top-left
> corner of the browser window, and we all know you can't scroll past the
> window's origin corner.
I see what you mean. I don't think there's a matrix math problem here.
If I had to guess, you are doing a coordinate transform from document
coordinates to canvas (and/or browser window) coordinates, and clamping
the wrong pair.
For instance, if I zoom a document to 150%, there is obviously document
content off-screen to the left. So the x coordinate is negative in the
browser window, but of course it is still positive in the document's
coordinate frame.
I know nothing about JavaScript frameworks (apart from the existence of
this "canvas" thing, which is a fairly generic term for a drawing window
anyway).
Anyway, if I can get my hands on the source, maybe we can put our heads
together on the problem.
Great work!
--
Regards,
Branden
pic2graph.1.ditroff
Description: Text document
signature.asc
Description: PGP signature