Changeset view uses (unreadable) grey text for printing

Issue #574 resolved
Dan Villiom Podlaski Christiansen created an issue

The CSS stylesheet for the changeset view uses grey text. Generally speaking, grey text is often suboptimal from a readability point of view, even though it may look good. However, printing on a budget monochrome laser printer, such as the one I have, makes it even worse; on most monochrome printers, dithering causes anything but black text to be hard to read.

I've attached an example printout from Safari 4 on a Mac. If you're interested, I can try to get a photo of the resulting printout. I'll see if I can dig up an example of a view I tuned for print readability too.

Comments (4)

  1. Dan Villiom Podlaski Christiansen reporter

    Attached below is an example of a HTML colorisation of a patch, generated from my Emacs settings, which are:

     '(diff-added ((t (:inherit diff-changed :background "#ddffdd" :weight bold))))
     '(diff-file-header ((((class color) (min-colors 88) (background light)) (:foreground "dark gray" :slant normal :weight bold))))
     '(diff-header ((((class color) (min-colors 88) (background light)) (:foreground "grey" :slant italic))))
     '(diff-hunk-header ((nil (:inherit diff-header :underline t :weight bold))))
     '(diff-indicator-added ((t (:foreground "#009900" :weight extra-bold))))
     '(diff-indicator-removed ((t (:foreground "#990000" :weight extra-bold))))
     '(diff-refine-change ((((class color) (min-colors 88) (background light)) (:weight bold))))
     '(diff-removed ((t (:inherit diff-changed :background "#ffdddd" :slant italic))))

    First and foremost, the added & removed portions are fully black, and with a low-contrast coloured background. I use bold for emphasising added text and italics for removed text. However, this may be problematic to do in large scale: I found that bold, in particular, yields unsatisfactory results unless the monospace font contains a proper bold variant, and the only one I could find which does so is ‘Consolas’. (It's relatively common and easily obtained through free-of-charge Microsoft downloads, but nonetheless not universally available.) Greys work well for de-emphasising less important regions, such as patch context.

    (The small red blocks are an artefact of my trailing whitespace settings, which I haven't bothered to fix, yet.)

  2. Eirik Stavem

    Dan, once this is deployed, could you test and give us feedback on whether or not you'd like something other than just black text? Perhaps some parts of the text should be bigger/bolder?

  3. Log in to comment