#201 Hotkey to resize fonts

open
nobody
5
2007-06-08
2007-06-08
No

In the interests of making it easier to use the console during a demo, it would be *extremely* helpful if there was a way to bump up the font size of the console without going through the properties dialog.

For instance, I have the font set to "Consolas" or "Lucida Console" and I'm using font smoothing etc, but when I'm demoing something (even for just a couple people crowded around my monitor), my default font size is too small.

In an ideal world, I'd love to be able to ctrl+mousewheel to "zoom" the font size, similar to how it works in other apps (my browser, visual studio/scite, office apps). But I would happily settle for something like Ctrl-Numpad+ and Numpad- to change font size in some increment ...

Discussion

  • Kirill

    Kirill - 2007-09-22

    Logged In: YES
    user_id=1664805
    Originator: NO

    It's not that difficult to catch Ctrl+WM_MOUSEWHEEL, but I got lost in the font handling code.

    Here is the first step:
    in ConsoleView::OnConsoleFwdMsg, just before TranslateKeyDown add:

    if (WM_MOUSEWHEEL == uMsg && wParam & MK_CONTROL) {
    short direction = HIWORD(wParam);

    // if direction is positive
    // increase font size for all tabs
    // else
    // decrease font size for all tabs
    // resize the window
    }

    Hope it helps a bit.

     
  • Kirill

    Kirill - 2007-09-22

    Logged In: YES
    user_id=1664805
    Originator: NO

    Ok, some experiments later, the following addition to ConsoleView::OnConsoleFwdMsg worked for me:

    if (uMsg == WM_MOUSEWHEEL && wParam & MK_CONTROL) {
    short direction = HIWORD(wParam);

    m_appearanceSettings.fontSettings.dwSize += direction / 120;
    RecreateOffscreenBuffers();
    m_mainFrame.AdjustWindowSize(false);
    RepaintView();
    return 0;
    }

    Also, I had to make MainFrame::AdjustWindowSize public.

     
  • Kirill

    Kirill - 2007-10-06

    Logged In: YES
    user_id=1664805
    Originator: NO

    Please, take a look at the patch [ 1808723 ] Support Ctrl+Mouse Wheel
    It's the same code with a bit of clean up.

     
  • Woody Thrower

    Woody Thrower - 2008-05-02

    Logged In: YES
    user_id=1253194
    Originator: NO

    I would also love to see this feature included in Console.

     
  • Kirill

    Kirill - 2008-05-02

    Logged In: YES
    user_id=1664805
    Originator: NO

    Woody,

    you can try my *unofficial* build from http://kirill.ca
    Note: it's based on b138.

    --
    Kirill.

     
  • Jason R. Coombs

    Jason R. Coombs - 2013-02-26

    I too would very much like to see this feature. Would someone consider doing another build with this patch against the latest release. I'd love to test it for possible inclusion in the next release.

     
  • Joel 'Jaykul' Bennett

    fwiw, I don't think posting here is going to have any effect, the last release was around 18 months ago. Personally, I've moved off Console2 and started using ConEmu.

     
  • Kirill

    Kirill - 2013-02-27

    Jason, my unofficial build from http://kirill.ca still has Ctrl+Mouse Wheel and is now based on the latest official version.

     
  • Jason R. Coombs

    Jason R. Coombs - 2013-03-10

    Thanks Kirill - works great!

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks