5 ms·
Ouch! Sorry! Anything specific? (DVI is my design.)
by drfuchs 7y ago
Ouch! Sorry! Anything specific? (DVI is my design.)
- mehrdadn 7y agoHaha wow! Yeah sure, here's an example of what I mean: https://imgur.com/a/eX2BcIC https://imgur.com/a/eX2BcIC I'll refrain from elaborating on the difference between those (it's probably best if I don't), except to say that my jaws will probably shatter the floor if you tell me you don't see the difference. :-) (Probably worth saying that I have the same issue with PS; it's not just DVI. I do sometimes wonder if I'm the only one who sees these.)
- drfuchs 7y agoThere’s no context given, so it’s hard to tell why you’re ascribing the problem to dvi, rather than it being used sub-optimally. What’s the full tool chain being used? What’s the output device? Given that dvi doesn’t involve pixels, and lets you position any character anywhere on the page, with precisely known rules for rounding into resolution-specific device-space, you’ll have to be more specific about what you’re blaming dvi itself for.
- mehrdadn 7y agoHappy to provide context if you tell me what to provide... The "output device" is... my monitor? The toolchain is TeXLive for generating the files, and the usual viewer for each file type on Windows (Acrobat Reader for PDFs, and Evince for DVI). If you think it's Evince's fault I'd love to hear better alternatives, because I haven't found a single viewer that views DVIs any differently. And for input files, you can generate files via LaTeX pretty easily: % DVI: latex thisfile.tex % PDF: pdflatex thisfile.tex \documentclass{article} \usepackage{lipsum} \begin{document}\lipsum\end{document} If this is using it "sub-optimally" then I guess I don't know how to use it "optimally", and I'm happy to hear how. Remember, though, at the end of the day, I'm just an end-user. I just know that every time I try to view DVI and PS files I have to tear my eyes out, and that I don't have this struggle with PDFs. I neither know which particular person or place in the pipeline to assign the blame to, nor does knowing that make it any easier for me to read the text...
- drfuchs 7y agoPresumably Evince could do a better job of it then.
- mehrdadn 7y agoWhat viewer would you recommend then? Would you mind posting a screenshot coming from the optimal viewer you have in mind? Like I said, I haven't found any viewer that does a better job.
- drfuchs 7y agoI’m not current, so I don’t know if anyone has bothered to do a dvi viewer optimized for today’s display technology. Given the billions of dollars invested in the pdf ecosystem, though, it’s a reasonable place to live.
- mehrdadn 7y ago> I’m not current, so I don’t know if anyone has bothered to do a dvi viewer optimized for today’s display technology. Oh, if that's the problem, then please just point to a better viewer for yesterday's display technology. Or even a decade ago's. I'll find you an older monitor from whatever era you had a good viewing experience on and try it on that. Because I'm one hundred percent sure an older display technology is not going to make it look better. You can see above that above pointed out that it's looked awful since 2003. I can vouch that it's consistently been awful since over a decade ago, and PDFs have consistently been fine... on every kind of display and resolution I've tried. I've absolutely never, ever had a good experience viewing DVIs.
- drfuchs 7y ago1982 DataDisc displays that Knuth developed everything on? Sorry you’re unhappy, but given that dvi is literally a dump of TeX’s internal results on layout positioning, it contains all the information that any other system could possibly use. Perhaps your concerns have more to do with font rendering?
- Asooka 7y agoThe DVI one looks a lot better to me. The PDF has some chromatic aberration-like effect on the letters that's really disgusting.
- svat 7y agoTypically with PDF you use vector fonts: the font designer creates the shapes of the letters, which are encoded as outlines. Your PDF viewer takes these outlines, and given your chosen zoom level and monitor resolution (which together determine how many pixels are available for displaying the letter "e", say), it rasterizes (converts to pixels) on-the-fly. In doing this (for low-resolution devices like computer monitors) it is further aided by “font hinting” which specifies how to hammer the font shape into the available pixel grid. On the other hand, given Knuth's goals of not having to re-do all the work when the technology changes, METAFONT is an “end-to-end” solution: starting with the font design (at a higher level than the outlines that are ultimately shipped for vector fonts), it goes all the way to generate the actual pixels for a given resolution (like 600 dpi or 2400 dpi), resulting in bitmap fonts (pre-rasterized) rather than vector fonts (rasterized on-the-fly by PDF viewer). There are a few consequences of these differences, for on-screen viewing: • Computer monitors are very low-resolution devices (even the most high-end “retina display”, “4K” or whatever) compared to print. There are several tricks required to make text look good on screen (see e.g. the chapters at rastertragedy.com for details): things like anti-aliasing/grayscaling (using pixels that are neither black nor white) and subpixel-rendering (using individual RGB subpixels that make up each screen pixel). • There's a conflict between thinking of on-screen viewing as serving to approximate to what the printed page will look like, versus allowing deformations or even re-positioning characters from where they'd be printed, to simply look better on screen. But all of this has nothing to do with the DVI format, ultimately (which is just an efficient encoding of the page layout, i.e. what characters from what fonts go where on the page). It's just that (1) many DVI viewers tend to use bitmap fonts for historical reasons, resulting in poor on-screen viewing, (2) some DVI viewers use their own libraries for rendering instead of using the best font-rendering libraries available on the system. • Even if using a bitmap font, the DVI viewer has a choice: (1) it can take the bitmaps that were generated for a certain resolution (typically for print, so something like 600 dpi which is probably higher than your screen resolution), and try to render those bitmaps at the number of pixels available (with the typical problems that result), or (2) it can try to ask METAFONT to run again to generate the fonts at whatever low resolution is appropriate for your monitor (but still without anti-aliasing and subpixel rendering, as MF was designed for higher-resolution devices and doesn't bother with all that). DVI viewers seem to always take the first option, probably to prevent the user's disk from filling up with lots of bitmap fonts for every possible zoom level. So the font rendering ends up sub-par. If you print it on a high-resolution device the output will be fine. • For screen display, the DVI viewer could choose to look up and use the corresponding vector font. • Finally, the DVI viewer could just convert to PDF (with dvipdfm or whatever) and have the same on-screen experience as with something that was originally a PDF file. In fact, on my current macOS system, the two DVI-viewing options I have (Skim and TeXShop's viewer) both seem to do exactly that internally, and the output is excellent.
- mmmrk 7y agoHm. Looks like the PDF sample has some light (auto)hinting and a bit of linear alpha blending and gamma correction applied (compare diagonal stems, e.g. on the "A"), while the DVI sample doesn't. I suppose this is less about DVI vs. PDF and more about Adobe doing text rendering properly, while Evince is probably using Cairo, which doesn't.
- perlgeek 7y agoMy experience with DVI must have been from 2003, and at that time, the viewer simply wasn't good. It was very clunky to move in the page or between pages, and there was only a magnifying glass zoom, no options to comfortably change page-wide zoom levels. I also remember the horrible font rendering mentioned elsewhere in the thread, but that would go away when printed or converted to PDF/PS, so I always assumed it was a bug in the viewer. That said, I always admired how small .dvi files were in comparison to PDF, and that they loaded much faster. Kudos!
- mehrdadn 7y agoDo you have any different of an experience today compared to 2003? My screenshots were from today and I don't see any difference.
- perlgeek 7y agoI haven't used latex in a while (mostly writing in markdown these days), so haven't tried it in a while. I have some .dvi files lying around from 2009, but trying to open them with evince results in kpathsea: Running mktexpk --mfmode / --bdpi 600 --mag 1+0/600 --dpi 600 aebx12 mktexpk: No such file or directory and 'apt search mktexpk' doesn't find anything. So, can't open DVIs anymore, it seems :(
- mehrdadn 7y agoI think it's part of texlive-binaries (apt-file search mktexpk).