Home » Posts tagged "PuTTY"

Favorite programming font on Windows: Consolas 10pt bold

For years I’ve used Courier New in my programming editors and terminal (PuTTY). But there’s a much better font available for that kind of stuff. For the last couple of years I’ve been using Consolas, which is shipped with Windows. I’ve configured my editors and PuTTY to use Consolas 10pt bold as I find it by far the best readable font to use for programming. This font is just the right size at 10pt and setting it to bold gives it a very smooth look.

Here’s how Consolas 10pt bold looks in GVim on Windows 8:

consolas

Recently I’ve given some other fonts a try as well because in the showed examples it appears they make a nice programming font. Not too long ago the Adobe Source Code Pro font was released and looking at the screenshot at that page it looks really nice. So I decided to download and install it. But trying it in GVim didn’t gave a satisfying result. It doesn’t look too bad, but it isn’t as compact as Consolas is:

source code pro

When using Linux (Ubuntu) I always useĀ Droid Sans Mono. But for some reason it looks really bad on Windows:

droid sans mono

As you can see Droid Sans Mono is even bigger and just doesn’t look right. I wonder why this is though I suspect it has to do with the font rendering on Windows. I’ve found font rendering on Linux a lot better and for what I’ve seen on Mac OSX as well, though I’ve recently heard a Mac user saying he found the font rendering on Linux even better.

And OK, the fonts don’t look that bad but imagine having to look at it all day when programming. All these examples have been set at 10pt bold and the extra space taken by both Adobe Source Code Pro and Droid Sans Mono is just bad in my opinion.

So far I haven’t found anything better than Consolas when it comes to a programming font on Windows. I’m not looking for a replacement of it but I’m always willing to try something new or different. My main disappointment I think comes with how bad Windows renders these fonts, because I know Droid Sans Mono looks good on Linux. If there’s any programming font that renders really well on Windows I’d really like to hear about it.

Making PuTTY prettier and nicer to work with

PuTTY has been my go-to SSH client on Windows for years but I’ve found that it does require a couple of tweaks to turn it into the (almost?) perfect SSH client. Below are some tweaks to improve PuTTY.

Display characters the way it’s meant

For years I’ve put up with PuTTY displaying certain accented characters or other symbols in a bad and nasty way. This will cause tools likeĀ aptitude and tmux to look really awful. It was not long ago that I found that this behavior could be fixed by setting the proper charset. Go to Window > Translation > Remote character set and change it to UTF-8. Lines drawn by tmux have never looked so good. It also removed an annoying display glitch I was having with irssi.

If this doesn’t work make sure Bash is set to use UTF-8 by adding

export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
export LANGUAGE=en_US.UTF-8

to your .bashrc.

More about setting up an UTF-8 environment.

Change the default font

By default PuTTY uses Courier New but I’m not really fond of it. Instead I use Consolas bold at 10pt. Using this font with these settings gives fuller text that’s better readable and nicer on the eyes. At least in my opinion.

Use PuTTYtray

I use PuTTYtray so I can set a transparent background. Just set alpha to 220 and the transparency is just perfect. PuTTYtray also has support for hiding your terminal in the system tray, but I personally don’t use that. If you don’t need either then I suppose standard PuTTY will be good enough. I do recommend to install PuTTY along side PuTTYtray though as it ships with some useful tools for key generation.

Change right mouse-button behavior

By default a click on the right mouse-button pastes anything you’ve got on your clipboard to the terminal. If you’re aware of this than it’s fine, but sometimes it can cause some inconvenience. Instead, change its behavior so a right mouse click will show a context menu which aside from pasting from the clipboard also adds some other useful shortcuts. You can find this setting under

Window > Selection > Action of mouse buttons and set it to Windows. The default is Compromise.

Full screen

If you use multiple screens (or not) you may already be resizing your terminal to fit the screen. Instead of full screen with the window border, title and scrollbar there’s also a full screen mode that removes this and uses the entire screen as your terminal space. To do this you need to enable this in

Window > Behaviour > Full screen on Alt-Enter. Doing so will let you use Alt + Enter to go to full screen.

Other settings?

In case I’ve missed any useful tweaks that improve usage of PuTTY I’d like to hear about them in the comments.