Cmd character font size

后端 未结 1 1153
北恋
北恋 2020-12-11 13:51

Did anybody know how to modify the character size in cmd.I allready search on internet but all what I i found was the method from Proprietes. I need something like mode x,y

相关标签:
1条回答
  • 2020-12-11 14:35

    You can not change (or at least i don't know how to do it) the properties of the current console from command line without some third party tool.

    BUT, you can customize the creation of a new console

    @echo off
    
        setlocal enableextensions disabledelayedexpansion
    
        set "consoleName=testing"
    
        :: http://technet.microsoft.com/en-us/library/cc978570.aspx
        (   reg add "HKCU\Console\%consoleName%" /f 
            reg add "HKCU\Console\%consoleName%" /f /v "FaceName"         /t "REG_SZ"     /d "Consolas"
            reg add "HKCU\Console\%consoleName%" /f /v "FontFamily"       /t "REG_DWORD"  /d 0x00000036
            reg add "HKCU\Console\%consoleName%" /f /v "FontSize"         /t "REG_DWORD"  /d 0x00080004
            reg add "HKCU\Console\%consoleName%" /f /v "FontWeight"       /t "REG_DWORD"  /d 0x00000000
            reg add "HKCU\Console\%consoleName%" /f /v "QuickEdit"        /t "REG_DWORD"  /d 0x00000000
            reg add "HKCU\Console\%consoleName%" /f /v "ScreenBufferSize" /t "REG_DWORD"  /d 0x00200040
            reg add "HKCU\Console\%consoleName%" /f /v "WindowSize"       /t "REG_DWORD"  /d 0x00200040
        ) > nul
    
        start "%consoleName%" cmd.exe
    

    The registry stores the configuration for multiple customizations of the console. This code just creates a basic customization associated to a window title and starts a new console with this title to use the indicated parameters.

    For more information, the documentation includes a complete reference of the values.

    0 讨论(0)
提交回复
热议问题