5

I love using Putty as a ssh terminal in Window. But what I don't like about it is that it doesn't allow me to change font using shortcut or a mouse. Is there a way(or plugin) to change the font size in putty using the wheel in mouse or contrl +/- key just as in other applications such as Mac Terminal, Chrome,etc?

Thanks

9

No, there isn't. Fonts have to be configured before starting the session or during the session with a long list of actions (access the window system menu - change settings - window - appearance).

However in a derived project called ExtraPuTTY this function (ctrl + mousewheel up/down) is available in latest development snapshot ("ExtraPuTTY 0.28 (Ind 16) snapshot version")

| improve this answer | |
3

You can alternatively use AutoHotKey with this script. This isn't exactly a quiet way but it works. The shortcuts are Ctrl+Alt+= to increase the size, and Ctrl+Alt+- to decrease the size. If you want Ctrl +/- keys, just remove exclamation marks.

ChangeFontSize(Direction="Down") {
    nIndex := 15;
    WinGet, hWnd, ID, ahk_class PuTTY
    hSysMenu := DllCall("GetSystemMenu", "UInt", hWnd, "UInt", False)
    nID := DllCall("GetMenuItemID", "UInt", hSysMenu, "UInt", nIndex)
    PostMessage, 0x112, nID, 0, , ahk_id %hWnd%
    SendInput {Shift Down}{Tab}{Shift Up}a{LAlt Down}n{LAlt Up}{LAlt Down}s{LAlt Up}{%Direction%}{Enter}{LAlt Down}a{LAlt Up}
}

#IfWinActive ahk_class PuTTY
^!=::
ChangeFontSize()
return

#IfWinActive ahk_class PuTTY
^!-::
ChangeFontSize("Up")
return

This was tested only on Windows 8.1 using PuTTY 0.62 (the vanilla one from the primary website). You may have to adjust nIndex value, which is 0-based and includes dividers, if your system menu looks different from what I have. If you're using a different version of PuTTY or a derivative then you may also have change the sequence of shortcut keys in the script. Make it work and enjoy.

This is what my PuTTY system menu looks like: PuTTY system menu on Windows 8.1

| improve this answer | |
  • Nice job! Pretty clever use of macros – Daniel Kessler Feb 5 '14 at 17:27
2

Although PuTTY doesn't by default support scroll to resize, PuTTY Tray does. That product maintains a fork of PuTTY with enhancements and bug fixes not found in the traditional version. I prefer it because they use GitHub for collaborative contributions.

| improve this answer | |
  • Unfortunately, as of 2020-08-24, the latest release for PuTTYTray is p0.67-t029 from 2016-06-26. The project is essentially 'dormant' (github.com/FauxFaux/PuTTYTray/issues/278). However, I found KiTTY (9bis.net/kitty) which is currently active and has been closely tracking PuTTY development for the last two years. It's at version v0.74.0.4 from 2020-08-12 and it has font zoom on Ctrl+Mouse Wheel and plenty of other features. I just tested the zoom function and it works. I can't vouch for the overall stability (I need more testing time). – Petru Zaharia Aug 23 at 22:46
1

At least on Windows 7 I increase/decrease the font size by holding Ctrl and scrolling the mouse wheel while in active Putty session

| improve this answer | |
-2

I don't change the font size, but I make Mac Terminal bigger or smaller, with the following keys: ⌘+ ⌘-

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.