Modify the cmd console font, use Fontlink to make the Chinese and English independent settings

Source: Internet
Author: User

As we all know, the windows in the CMD console window font is ugly, but modify the registry can be implemented to modify its font, but a lot of great programming fonts are not Chinese, so in the display of Chinese directly called the song body, this wonderful contrast is not bear to look directly. However, the students who used Mactype should remember that there is a font replacement in the Mactype configuration file, yes, it is fontlink.

  First change the code for CMD to 850 or something, and the success will show "Active code page:850".
    1. chcp 850
  Then simply set the font to your favorite programming font, such as Ubuntu Mono, Source Code Pro. Registration Form Entry
    1. HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Console\TrueTypeFont
  You'll see something like this:  Which is named 0, 00, 、... The key is the font under the default encoding, and 932, 936 is the font encoded as 932/936. Here we create a new string named "0", and add a "0" if it already has the same name. (for example, on the basis of adding a font is "00000") double-click this key to modify the key value for the font name, do not know the font name can open Notepad, under the font settings to view.  The font is added and the right-click cmd window title bar can be set. If the settings are successful then you will find the fonts are beautiful:then the next step is to use Fontlink to achieve a mixed display in Chinese and English, FontlinkEnglish font can be specified in the corresponding Chinese font (for example: in the display of English fonts, the English font, those who do not display English fonts will be preferred to use the Chinese font specified here, if not specified then will use the system default font, usually the song body). Registration Form Entry
    1. HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontLink\SystemLink
You will find that there are many keys with the name of the font, which is why we can still display Chinese correctly when using English fonts. Now we need to create a key like this, create a new multi-string key "Source Code Pro" (This is the font name you set previously, the key type is multi-string), and then follow the input: Here's simyou. TTF is the file name of the juvenile font, followed by the number is used to adjust the Chinese font size so that it can match the English font (the default is 128,96 here Chinese font: English font is 1.6:1, so set to 128*1.2,96*1.2 that is 154,115). When the width of a Chinese character equals two lowercase letters, the two match.the second line repeats the simyou. TTF is intended to enable GDI + to recognize the font, and the first line is a GDI call. After setting up the reboot system, it is OK.

Modify the cmd console font, use Fontlink to make the Chinese and English independent settings

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.