Fixing the Font for Github Gists

I’ve switched to the Github Gist service for my code examples. It’s a great service: easy to use, the code is versioned and you can download it easily.

However the default fonts make your eyes bleed, at least on my Windows machine. It suffers from heavy aliasing,  so that you have trouble reading it. Clear Type doesn’t seam to work. Here’s an example-rendering:

Luckily it’s easy to fix it by specifying another font in your CSS. I’ve changed the font selection to prefer the beautiful Consolas font

.gist .gist-file .gist-data .gist-highlight pre{
   font-family: "Consolas", "Courier New", Courier, "Bitstream Vera Sans Mono", monospace;
}

And it looks much, much better.

I haven’t tested it yet on other platforms, but at least it better on Windows. When you know a good monospaced-font for your favorite platform tell me, I’ll include it in my CSS.

Tagged on: ,

3 thoughts on “Fixing the Font for Github Gists

Leave a Reply

Your email address will not be published. Required fields are marked *