Default fonts in `img` formatter are backwards

Issue #1221 new
Scott Colby
created an issue

In the documentation, it is stated that the default font for the img formatter is '“Bitstream Vera Sans Mono” on Windows, Courier New on *nix.'

However, at lines 48-49 of pygments-main/pygments/formatters/img.py we have:

DEFAULT_FONT_NAME_NIX = 'Bitstream Vera Sans Mono'
DEFAULT_FONT_NAME_WIN = 'Courier New'

Bitstream Vera Sans Mono is not even shipped on OS X.

I think this is a duplicate of issue #868, but that has languished for two years now and, since this is such a simple fix, I figured I would bring it to attention again.

Comments (8)

  1. Georg Brandl repo owner

    It is definitely intended that Vera is used on Unix, and Courier New on Windows; the documentation is wrong in this case.

    As for Mac OS X, #868 seems to imply that font selection is even more broken, and it needs a more comprehensive fix.

  2. Scott Colby reporter

    In that case, I believe a third case for font selection should be added, since by default Vera will not work on OS X and the package is broken out of the box.

  3. Scott Colby reporter

    From what I can tell, my default installation came with these monospaced fonts:

    • Andale Mono
    • Courier
    • Courier New
    • Menlo
    • Monaco

    Courier lacks italics (it has obliques though). The default font used in Terminal is Menlo, which comes with Regular, Italic, Bold, and Bold Italic.

  4. Log in to comment