[comp.windows.x] dvi previewer

nrh@buzz.bellcore.com (Nat Howard) (10/30/87)

Does anyone have  a version of xdvi that runs under X11?

grunwald@uiucdcsm.cs.uiuc.edu (10/31/87)

I got the version of 'xdvi' that eichin@bloom-beacon.mit.edu had converted
from X-10.

However, at Illinois CS, we mainly use Imagens, and Chris Toreks Imagen
driver, 'iptex'. Iptex handles pxl, pk & gf fonts, and has a 
'fontdirectory' which is a little nicer to handle than 'TEXFONTS'.
Also, he had a whole library of dvi stuff which is easy to use.

So, what that means is that I wrote a 'dvi previewer kernel' which makes
calls to application-specific routines ('put up this glyph, draw that line,
etc'), and then re-wrote 'xdvi' into a somewhat nicer beast. The kernel
uses the 'iptex' library.

I sped up the font-shrinking routines by using look-up tables, and I've
added a more forgiving font-shrinking interface -- it sizes the initial
window so that the entire document will fit on your display, and when
you shrink your fonts (expand your document size), it resizes the window
to take advantage of the display. Also, it maintains the 'original'
glyphs, and just copies those when glyphs get shrunk -- takes more memory,
but makes shrinking & unshrinking be a lot less painful.

Additionally, the page is painted onto a pixmap & then displayed. This allows
you to handle uncovers & moving around a lot easier.

I'm still not happy with the speed -- I had hoped that the pixmaps would
be local, and thus each XPutImage would be local, and only the final
XCopyArea would involve talking to the server, but it doesn't appear that
this is the case (i.e. it's still not as fast as one would like).

I'm willing to start distributing this version soon, if people want it.
Eventually, someone here who doesn't use X-windows will break down and
use the same dvi kernel for a SunView version (he's going to call it
'texsun' 'cause he's from TeXas)

Additionally, I'm going to use the same kernel to make a slight varient,
which will have two pages at a shrunken size, and a 'magnifing glass' to
zoom in on an area. This way, you'll be looking at one page while the
other is being computed, and turning the page will just involve XCopyArea,
so it'll be fast. It'd also be nice to cache formatted pages on disk.