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
x T pdf
x res 72000 1 1
x init
p1
x font 5 TR
f5
s10000
V48000
H72000
md
DFd
tPIC2GRAPH(1)
h111510
tGeneral
wh2500
tCommands
wh2500
tManual
h111510
tPIC2GRAPH(1)
n12000 0
V84000
H72000
x X devtag:.NH 1
x font 16 TB
f16
s10950
V84000
H72000
tN
H79687
tAME
wh2738
x X devtag:.eo.h
V84000
H107972
n12000 0
f5
s10000
V96000
H108000
tpic2graph
wh2500
C\-
wh8140
tcon
H172670
tv
H177520
tert
wh2500
ta
wh2500
tPIC
wh2500
tdiagram
wh2500
tinto
wh2500
ta
wh2500
tcropped
wh2500
timage
n12000 0
V112800
H72000
x X devtag:.NH 1
f16
s10950
V112800
H72000
tSYNOPSIS
wh2738
x X devtag:.eo.h
V112800
H128283
n12000 0
V124800
H108000
x X devtag:.col 1
s10000
V124800
H108000
tpic2graph
wh2500
x X devtag:.col 2
f5
V124800
H153840
t[
f16
C\-
h5700
tunsafe
f5
t]
wh2500
t[
f16
C\-
h5700
tf
H208590
tormat
x font 18 TI
f18
h2500
toutput-format
f5
h680
t]
wh2500
t[
f16
C\-
h5700
teqn
f18
h2500
tdelimeter
f5
h730
t]
wh2500
t[
f18
h200
tcon
H388250
tvert-options
f5
h270
t]
n12000 0
V141600
H72000
x X devtag:.NH 1
f16
s10950
V141600
H72000
tDESCRIPTION
wh2738
x X devtag:.eo.h
V141600
H150787
n12000 0
f5
s10000
V153600
H108000
tReads
wh2500
ta
wh2500
tPIC
wh2500
tprogram
wh2500
tas
wh2500
tinput;
wh2500
tproduces
wh2500
tan
wh2500
timage
wh2500
Cfi
h5560
tle
wh2500
t(by
wh2500
tdef
H354250
tault
wh2500
tin
wh2500
tPortable
wh2500
tNetw
H439420
tork
wh2500
tGraphics
wh2500
tformat)
n12000 0
V165600
H108000
tsuitable
wh2500
tfor
wh2500
tthe
wh2500
tW
H179130
teb
wh2500
tas
wh2500
toutput.
wh5000
tAlso
wh2500
ttranslates
wf16
h2500
teqn
f5
t(1)
wh2500
tconstructs,
wh2500
tso
wh2500
tit
wh2500
tcan
wh2500
tbe
wh2500
tused
wh2500
tfor
wh2500
tgenerating
wh2500
timages
wh2500
tof
n12000 0
V177600
H108000
tmathematical
wh2500
tformulae.
n12000 0
V194400
H108000
tPIC
wh2500
tis
wh2500
ta
wh2500
trather
wh2500
te
H172280
txpressi
H200360
tv
H205210
te
wh2500
tgraphics
wh2500
tminilanguage
wh2500
tsuitable
wh2500
tfor
wh2500
tproducing
wh2500
tbox-and-arro
H448240
tw
wh2500
tdiagrams
wh2500
tof
wh2500
tthe
n12000 0
V206400
H108000
tkind
wh2500
tfrequently
wh2500
tused
wh2500
tin
wh2500
ttechnical
wh2500
tpapers
wh2500
tand
wh2500
tte
H294200
txtbooks.
wh5000
tThe
wh2500
tlanguage
wh2500
tis
wh2500
tsuf
H411160
Cfi
h5560
tciently
wh2500
Cfl
h5560
te
H456290
txible
wh2500
tto
wh2500
tbe
wh2500
tquite
n12000 0
V218400
H108000
tuseful
wh2500
tfor
wh2500
tstate
wh2500
tcharts,
wh2500
tPetri-net
wh2500
tdiagrams,
wh2500
Cfl
h5560
to
H287720
tw
wh2500
tcharts,
wh2500
tsimple
wh2500
tcircuit
wh2500
tschematics,
wh2500
tjumper
wh2500
tlayouts,
wh2500
tand
wh2500
tother
n12000 0
V230400
H108000
tkinds
wh2500
tof
wh2500
tillustration
wh2500
tin
H196220
tv
H201020
tolving
wh2500
trepetiti
H257160
tv
H262010
te
wh2500
tuses
wh2500
tof
wh2500
tsimple
wh2500
tgeometric
wh2500
tforms
wh2500
tand
wh2500
tsplines.
wh5000
tBecause
wh2500
tPIC
n12000 0
V242400
H108000
tdescriptions
wh2500
tare
wh2500
tprocedural
wh2500
tand
wh2500
tobject-based,
wh2500
tthe
H303350
ty
wh2500
tare
wh2500
tboth
wh2500
tcompact
wh2500
tand
wh2500
teasy
wh2500
tto
wh2500
tmodify
H457950
t.
n12000 0
V259200
H108000
tThe
wh2500
tPIC
wh2500
tlanguage
wh2500
tis
wh2500
tfully
wh2500
tdocumented
wh2500
tin
wf18
h2500
tMaking
wh2500
tPictur
H332610
tes
wh2500
tW
H351220
tith
wh2500
tGNU
wh2500
tPIC
f5
h720
t,
wh2500
ta
wh2500
tdocument
wh2500
twhich
wh2500
tis
wh2500
tpart
wh2500
tof
wh2500
tthe
n12000 0
f16
V271200
H108000
tgr
H117260
toff
f5
t(1)
wh2500
tdistrib
H168440
tution.
n12000 0
V288000
H108000
tY
H114120
tour
wh2500
tinput
wh2500
tPIC
wh2500
tcode
wh2500
tshould
wf18
h2860
tnot
wf5
h3180
tbe
wh2500
twrapped
wh2500
twith
wh2500
tthe
wf16
h2500
t.PS
wf5
h2500
tand
wf16
h2500
t.PE
wf5
h2500
tmacros
wh2500
tthat
wh2500
tnormally
wh2500
tguard
wh2500
tit
wh2500
twithin
n12000 0
f16
V300000
H108000
tgr
H117260
toff
f5
t(1)
wh2500
tdocuments.
n12000 0
V316800
H108000
tThe
wh2500
toutput
wh2500
timage
wh2500
twill
wh2500
tbe
wh2500
tclipped
wh2500
tto
wh2500
tthe
wh2500
tsmallest
wh2500
tpossible
wh2500
tbounding
wh2500
tbox
wh2500
tthat
wh2500
tcontains
wh2500
tall
wh2500
tthe
wh2500
tblack
wh2500
tpix
H513670
tels.
n12000 0
V328800
H108000
tOlder
wh2500
tv
H138120
tersions
wh2500
tof
wf16
h2500
tcon
H194380
tv
H199280
tert
f5
t(1)
wh2500
twill
wh2500
tproduce
wh2500
ta
wh2500
tblack-on-white
wh2500
tgraphic;
wh2500
tne
H392860
twer
wh2500
tones
wh2500
tmay
wh2500
tproduce
wh2500
ta
wh2500
tblack-on-
n12000 0
V340800
H108000
ttransparent
wh2500
tgraphic.
wh5000
tBy
wh2500
tspecifying
wh2500
tcommand-line
wh2500
toptions
wh2500
tto
wh2500
tbe
wh2500
tpassed
wh2500
tto
wf16
h2500
tcon
H419230
tv
H424130
tert
f5
t(1)
wh2500
tyou
wh2500
tcan
wh2500
tgi
H491910
tv
H496760
te
wh2500
tit
wh2500
ta
n12000 0
V352800
H108000
tborder
H133700
t,
wh2500
tforce
wh2500
tthe
wh2500
tbackground
wh2500
ttransparent,
wh2500
tset
wh2500
tthe
wh2500
timage'
H331150
ts
wh2500
tpix
H350170
tel
wh2500
tdensity
H388130
t,
wh2500
tor
wh2500
tperform
wh2500
tother
wh2500
tuseful
n12000 0
V364800
H108000
ttransformations.
n12000 0
V381600
H108000
tThis
wh2500
tprogram
wh2500
tuses
wf16
h2500
tpic
f5
t(1),
wf16
h2500
teqn
f5
t(1),
wf16
h2500
tgr
H255300
toff
f5
t(1),
wf16
h2500
tgs
f5
t(1),
wh2500
tand
wh2500
tthe
wh2500
tImageMagick
wf16
h2500
tcon
H413470
tv
H418370
tert
f5
t(1)
wh2500
tprogram.
wh5000
tThese
n12000 0
V393600
H108000
tprograms
wh2500
tmust
wh2500
tbe
wh2500
tinstalled
wh2500
ton
wh2500
tyour
wh2500
tsystem
wh2500
tand
wh2500
taccessible
wh2500
ton
wh2500
tyour
wh2500
t$P
H385110
tA
H391220
tTH
wh2500
tfor
wf16
h2500
tpic2graph
wf5
h2500
tto
wh2500
tw
H484450
tork.
n12000 0
V410400
H72000
x X devtag:.NH 1
f16
s10950
V410400
H72000
tOPTIONS
wh2738
x X devtag:.eo.h
V410400
H124024
n12000 0
s10000
V422400
H108000
C\-
h5700
tunsafe
n12000 0
f5
V434400
H144000
tRun
wf16
h2500
tpic
f5
t(1)
wh2500
tand
wf16
h2500
tgr
H216310
toff
f5
t(1)
wh2500
tin
wh2500
tthe
wh2500
Coq
h3330
tunsafe
Ccq
wh5830
tmode
wh2500
tenabling
wh2500
tthe
wh2500
tPIC
wh2500
tmacro
wf16
h2500
tsh
wf5
h2500
tto
wh2500
te
H450840
tx
H455690
tecute
wh2500
tarbitrary
n12000 0
V446400
H144000
tcommands.
wh5000
tThe
wh2500
tdef
H225550
tault
wh2500
tis
wh2500
tto
wh2500
tforbid
wh2500
tthis.
n12000 0
f16
V463200
H108000
C\-
h5700
tf
H116780
tormat
wf18
h4470
tfmt
n12000 0
f5
V475200
H144000
tSpecify
wh2500
tan
wh2500
toutput
wh2500
tformat;
wh2500
tthe
wh2500
tdef
H276380
tault
wh2500
tis
wh2500
tPNG
wh2500
t(Portable
wh2500
tNetw
H386270
tork
wh2500
tGraphics).
wh5000
tAn
H461100
ty
wh2500
tformat
wh2500
tthat
n12000 0
f16
V487200
H144000
tcon
H158600
tv
H163500
tert
f5
t(1)
wh2500
tcan
wh2500
temit
wh2500
tis
wh2500
tsupported.
n12000 0
f16
V504000
H108000
C\-
h5700
teqn
wf18
h2850
tdelim
n12000 0
f5
V516000
H144000
tChange
wh2500
tthe
wh2500
tfencepost
wh2500
tcharacters
wh2500
tthat
wh2500
tdelimit
wf16
h2500
teqn
f5
t(1)
wh2500
tdirecti
H378980
tv
H383830
tes
wh2500
t(
f16
t$
wf5
h2500
tand
wf16
h2500
t$
f5
t,
wh2500
tby
wh2500
tdef
H457600
tault).
wh5000
tThis
wh2500
toption
n12000 0
V528000
H144000
trequires
wh2500
tan
wh2500
tar
H198240
tgument,
wh2500
tb
H238040
tut
wh2500
tan
wh2500
tempty
wh2500
tstring
wh2500
tis
wh2500
taccepted
wh2500
tas
wh2500
ta
wh2500
tdirecti
H402760
tv
H407610
te
wh2500
tto
wh2500
tdisable
wf16
h2500
teqn
f5
t(1)
wh2500
tprocessing.
n12000 0
V544800
H108000
tCommand-line
wh2500
tswitches
wh2500
tand
wh2500
tar
H231970
tguments
wh2500
tnot
wh2500
tlisted
wh2500
tabo
H322100
tv
H326950
te
wh2500
tare
wh2500
tpassed
wh2500
tto
wf16
h2500
tcon
H402640
tv
H407540
tert
f5
t(1).
n12000 0
V561600
H72000
x X devtag:.NH 1
f16
s10950
V561600
H72000
tFILES
wh2738
x X devtag:.eo.h
V561600
H106384
n12000 0
s10000
V573600
H108000
t/usr/local/shar
H168940
te/gr
H185420
toff/1.22.4/tmac/eqnr
H271340
tc
n12000 0
f5
V585600
H144000
tThe
wf16
h2500
teqn
f5
t(1)
wh2500
tinitialization
wh2500
Cfi
h5560
tle.
n12000 0
V602400
H72000
x X devtag:.NH 1
f16
s10950
V602400
H72000
tENVIR
H106953
tONMENT
wh2738
x X devtag:.eo.h
V602400
H158967
n12000 0
s10000
V614400
H108000
tGR
H122700
tOFF_TMPDIR
n12000 0
f5
V626400
H144000
tThe
wh2500
tdirectory
wh2500
tin
wh2500
twhich
wh2500
ttemporary
wh2500
Cfi
h5560
tles
wh2500
twill
wh2500
tbe
wh2500
tcreated.
wh5000
tIf
wh2500
tthis
wh2500
tis
wh2500
tnot
wh2500
tset
wf16
h2500
tpic2graph
wf5
h2500
tsearches
wh2500
tthe
n12000 0
V638400
H144000
ten
H153040
tvironment
wh2500
tv
H201400
tariables
wf16
h2500
tTMPDIR
f5
t,
wf16
h2500
tTMP
f5
t,
wh2500
tand
wf16
h2500
tTEMP
wf5
h2500
t(in
wh2500
tthat
wh2500
torder).
wh5000
tOtherwise,
wh2500
ttemporary
wh2500
Cfi
h5560
tles
n12000 0
V650400
H144000
twill
wh2500
tbe
wh2500
tcreated
wh2500
tin
wf16
h2500
t/tmp
f5
t.
n12000 0
V667200
H72000
x X devtag:.NH 1
f16
s10950
V667200
H72000
tB
H79194
tUGS
wh2738
x X devtag:.eo.h
V667200
H104445
n12000 0
f5
s10000
V679200
H108000
tDue
wh2500
tto
wh2500
tchanges
wh2500
tin
wh2500
tthe
wh2500
tbeha
H215830
tvior
wh2500
tof
wh2500
tImageMagick
wf16
h2500
tcon
H317910
tv
H322810
tert
f5
t(1)
wh2500
tthat
wh2500
tare
wh2500
tboth
wh2500
tforw
H420450
tard
wh2500
tand
wh2500
tbackw
H478660
tard-
n12000 0
V691200
H108000
tincompatible,
wh2500
tmismatches
wh2500
tbetween
wh2500
tyour
wf16
h2500
tpic2graph
wf5
h2500
tand
wf16
h2500
tcon
H348970
tv
H353870
tert
f5
t(1)
wh2500
tv
H385090
tersions
wh2500
tmay
wh2500
tproduce
wh2500
tzero-sized
wh2500
tor
n12000 0
V703200
H108000
tuntrimmed
wh2500
toutput
wh2500
timages.
wh5000
tF
H223690
tor
wh2500
tthis
wh2500
tv
H256320
tersion
wh2500
tof
wf16
h2500
tpic2graph
wf5
h2500
tyou
wh2500
twill
wh2500
tneed
wh2500
ta
wh2500
tv
H408660
tersion
wh2500
tof
wf16
h2500
tcon
H461030
tv
H465930
tert
f5
t(1)
wh2500
tthat
n12000 0
V715200
H108000
tsupports
wh2500
tthe
wf16
h2500
C\-
h5700
ttrim
wf5
h2500
toption;
wh2500
tolder
wh2500
tv
H244930
tersions
wh2500
tof
wf16
h2500
tpic2graph
wf5
h2500
tused
wf16
h2500
C\-
h5700
tcr
H367660
top
h2500
t0x0
f5
t,
wh2500
twhich
wh2500
tno
wh2500
tlonger
wh2500
thas
wh2500
ttrimming
n12000 0
V727200
H108000
tbeha
H126680
tvior
H142240
t.
n12000 0
V768000
H72000
tGrof
H90630
tf
wh2500
tV
H102570
tersion
wh2500
t1.22.4.rc2.10-5f6b-dirty
h51785
t22
wh2500
tApril
wh2500
t2018
h200945
t1
n12000 0
V792000
p2
x font 5 TR
f5
s10000
V48000
H72000
tPIC2GRAPH(1)
h111510
tGeneral
wh2500
tCommands
wh2500
tManual
h111510
tPIC2GRAPH(1)
n12000 0
V84000
H72000
x X devtag:.NH 1
x font 16 TB
f16
s10950
V84000
H72000
tA
H79358
tUTHORS
wh2738
x X devtag:.eo.h
V84000
H128338
n12000 0
s10000
V96000
H108000
tpic2graph
wf5
h2500
tw
H160960
tas
wh2500
twritten
wh2500
tby
wh2500
tEric
wh2500
tS.
wh2500
tRaymond
wx font 11 S
f11
h2500
Cla
f5
h3290
tesr@th
H318120
tyrsus.com
f11
Cra
f5
h3290
t,
wh2500
tbased
wh2500
ton
wh2500
ta
wh2500
trecipe
wh2500
tby
wh2500
tW
H459900
t.
wh2500
tRichard
wh2500
tSte
H511590
tv
H516440
tens.
n12000 0
V112800
H72000
x X devtag:.NH 1
f16
s10950
V112800
H72000
tSEE
wh2738
tALSO
wh2738
x X devtag:.eo.h
V112800
H127989
n12000 0
s10000
V124800
H108000
teqn2graph
f5
t(1),
wf16
h2500
tgrap2graph
f5
t(1),
wf16
h2500
tpic
f5
t(1),
wf16
h2500
teqn
f5
t(1),
wf16
h2500
tgr
H308920
toff
f5
t(1),
wf16
h2500
tgs
f5
t(1),
wf16
h2500
tcon
H377390
tv
H382290
tert
f5
t(1).
n12000 0
V768000
H72000
tGrof
H90630
tf
wh2500
tV
H102570
tersion
wh2500
t1.22.4.rc2.10-5f6b-dirty
h51785
t22
wh2500
tApril
wh2500
t2018
h200945
t2
n12000 0
x trailer
V792000
x stop

Attachment: signature.asc
Description: PGP signature

Reply via email to