Cmd character font size

2020-02-06 17:40发布

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 but for characters.

标签: cmd
1条回答
迷人小祖宗
2楼-- · 2020-02-06 18:08

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.

查看更多
登录 后发表回答