- Как добавить пользовательские шрифты в командную строку в Windows 10
- Найти и установить подходящий моноширинный шрифт
- Добавьте пользовательский шрифт в реестр
- Добавьте пользовательский шрифт в командную строку
- How to add Custom Fonts to Command Prompt in Windows 10
- Find & install a suitable monospace font
- Add the custom font to the Registry
- Add the custom font to the Command Prompt
- How can I add additional fonts to the Windows console?
- 1 Answer 1
- How to add new fonts to your Powershell (Or CMD ) Console settings?
- Steps to install a TTF file using FontForge
- Load the new font(s) into the Console registry
Как добавить пользовательские шрифты в командную строку в Windows 10
Мы все регулярно используем командную строку Windows для решения системных проблем, запуска командных файлов, а также для выполнения расширенных функций администрирования. Поскольку вы часто используете окно командной оболочки, вы можете обнаружить, что шрифт по умолчанию вам не по вкусу, и вы можете изменить шрифт в командной строке для лучшей читаемости.
Однако командная строка Windows имеет ограниченную область для настройки. Хотя в пользовательский интерфейс командной строки можно внести несколько изменений, например добавить прозрачность, изменить цвета и т. Д., Он все равно выглядит как старый интерфейс DOS с ограниченной гибкостью для настройки в соответствии с предпочтениями пользователя. Кроме того, приложение интерпретатора командной строки имеет очень мало вариантов для изменения шрифта. Выбор шрифта ограничен несколькими вариантами от 2 до 7 в зависимости от версии Windows.
Хотя нет прямого условия для добавления пользовательских шрифтов и изменения шрифтов в командной строке Windows, однако теперь вы можете добавить пользовательские шрифты в командную строку, используя реестр.
В этой статье мы расскажем, как добавить пользовательские шрифты в командную строку в Windows 10. Но перед тем, как мы начнем, важно отметить, что командная строка Windows может поддерживать только моноширинные шрифты. Моноширинные шрифты – это шрифты фиксированной ширины, в которых интервалы и буквы занимают одинаковую ширину в отличие от шрифтов переменной ширины. Стоит отметить, что моноширинные шрифты чрезвычайно полезны для написания исходного кода компьютерной программы. Фиксированная ширина символа помогает программистам отслеживать строки специальных символов в программном коде. Как только вы нашли подходящий моноширинный шрифт, пользователи могут включить пользовательские шрифты в командной строке, настроив реестр. Выполните следующие шаги, чтобы добавить пользовательские шрифты в командную строку.
Найти и установить подходящий моноширинный шрифт
В командной строке Windows в основном есть два варианта шрифта. Это может быть Lucida или растр . Чтобы добавить пользовательские шрифты, необходимо установить шрифт в системе, используя веб-сервисы, такие как FontSquirrel, Google Fonts и другие.
Как упоминалось ранее, командная строка распознает только моноширинные шрифты. Кроме того, Microsoft также указывает, что пользовательский шрифт, добавляемый в окно командной оболочки, должен быть FF_MODERN , если это шрифт TrueType, и OEM_CHARSET , если это шрифт, отличный от TrueType. шрифт. Microsoft также добавляет критерии, согласно которым шрифты, выбранные для командной строки, не могут иметь отрицательный пробел A или C и не могут быть шрифтом курсивного стиля .
Чтобы узнать, будет ли шрифт работать в командной строке, пользователи должны сначала установить шрифт, а затем попытаться включить его в командной строке. Хотя большинство моноширинных шрифтов сторонних веб-сервисов распознается командной строкой Windows, вы не сможете заранее прогнозировать, работает ли шрифт для вашей версии Windows, до тех пор, пока вы не попытаетесь их установить.
Как только вы найдете подходящий моноширинный шрифт, скачайте его и установите в своей системе Windows.
Как только шрифт установлен, следующий шаг – добавить их в командную строку с помощью редактора реестра.
Добавьте пользовательский шрифт в реестр
ОС Windows не позволяет пользователям добавлять пользовательские шрифты в командную строку непосредственно через пользовательский интерфейс. Чтобы сделать моноширинный шрифт доступным в командной строке, необходимо сначала добавить информацию об установленных шрифтах в реестр.
Откройте окно «Выполнить», введите regedit и нажмите Enter.
Далее перейдите по следующему пути:
В правой части панели реестра вы увидите список шрифтов, используемых командной строкой, с соответствующим значением уникального имени, например 0, 00,01 и т. Д.
Чтобы создать собственный шрифт, щелкните правой кнопкой мыши на правой стороне панели реестра и выберите Новый.
Теперь выберите строковое значение и назовите строковое значение уникальным номером. Если у вас уже есть строковое значение с 00, то назовите новое строковое значение как 000 . Просто обратите внимание, что значение, которое вы вводите, должно быть уникальным числом.
Дважды щелкните по вновь созданному строковому значению и введите имя шрифта в поле данных значения.
Нажмите ОК , чтобы применить изменения и перезагрузить систему.
Добавьте пользовательский шрифт в командную строку
Откройте Командную строку , щелкните правой кнопкой мыши строку заголовка и выберите Свойства в раскрывающемся меню.
Перейдите на вкладку Шрифт в окне свойств командной строки.
Выберите установленный шрифт в разделе Шрифт и нажмите ОК.
После этого вы должны быть в состоянии использовать командную строку с вашим любимым установленным шрифтом. Можно также изменить размер шрифта для хорошей читаемости.
Стоит отметить, что, если вы не видите шрифт в списке шрифтов окна «Свойства» в командной строке, вероятно, выбранный вами шрифт либо не поддерживается вашей версией Windows, либо вы добавили шрифт, который моноширинный шрифт.
Хотите сделать командную строку прозрачной?
How to add Custom Fonts to Command Prompt in Windows 10
We all use the Windows Command Prompt regularly to solve the system issues, run batch files, and also to perform advanced administrative functions. As you use the Command shell window frequently, you may find that the default font not to your liking, and you may want to change the font in the command prompt for better readability.
However, the Windows command prompt has limited scope for customization. While it is possible to make few customizations to the command prompt user interface, like, adding transparency, changing colors, etc., it still looks like the old DOS interface with the limited flexibility for customizing according to the user’s preference. Moreover, the command line interpreter application has very few choices for changing the font. The font selection is limited to few choices from 2 to 7 depending on the Windows version.
While there is no direct provision to add custom fonts and change the fonts in the Windows Command prompt, you can however now add custom fonts to the Command Prompt by making use of the registry.
In this article, we explain how to add the custom fonts to the command prompt in Windows 10. But before we start, it is important to note that the Windows command prompt can only support monospace fonts. Monospace fonts are fixed-width font where the spacings and letters occupy the same width in contrast to the variable width fonts. It is worth mentioning that, monospace fonts are extremely useful for writing the computer program source code. The character’s fixed-width aids programmers to keep track of special character strings in the program code. Once you have found the suitable monospace font, users can enable the custom fonts in Command Prompt by tweaking the Registry. Follow the below steps to add the custom fonts to the command prompt.
Find & install a suitable monospace font
The Windows command prompt has mostly two choices for the font. It can be either Lucida or Raster. To add custom fonts, one must install a font on a system using web services like FontSquirrel, Google Fonts, and others.
As mentioned earlier, the Command Prompt will recognize only monospace fonts. Additionally, Microsoft also specifies that the custom font you add to the command shell window must be FF_MODERN if it is TrueType font and OEM_CHARSET if it is a font other than the TrueType font. Microsoft also adds the criteria that the fonts you choose for the command prompt cannot have a negative A or C space, and it cannot be an italic style font.
To know if the font will work on the command prompt, users must first install the font and then try to enable it in the command prompt. While most of the monospaced fonts from the third party web services is recognized by Windows Command prompt, you will not be able to predict in advance, if the font works for your Window version, until and unless you try to install them.
Once you find the suitable monospace font, download the font and install it on your Windows system.
Once the font is installed, the next step is to add them to the command prompt using the registry editor.
Add the custom font to the Registry
Windows OS does not allow users to add the custom fonts to command prompt directly through the user interface. To make the monospace font available in Command prompt, you need to first add the information of the installed fonts to the registry.
Open Run box, type regedit, and press Enter.
Next, navigate to the following path:
In the right side of the registry panel, you will see the list of fonts that are used by command prompt with the respective unique name value like 0, 00,01, etc.
To create a custom font, right-click on the right side of the registry panel and click on New.
Now select the string value and name the string value with a unique number. If you already have a string value with 00, then name the new string value as 000. Just note that the value you enter should be some unique number.
Double-click on the newly created string value and give the name of the font in the value data field.
Click OK to apply the changes and restart your system.
Add the custom font to the Command Prompt
Open Command Prompt and right-click on the title bar and click on Properties from the drop-down menu.
Navigate to the Font tab in the Command Prompt Properties window.
Select the font you installed under the Font section and click on OK.
Once done you must be able to use the command prompt with your favorite installed font. One can also change the font size for good readability.
It is worth noting that, if you cannot see the font in the font list of the Properties window in Command prompt, it is likely that the font you have chosen is either not supported by your Windows version or you have added a font that is not a monospace font.
How can I add additional fonts to the Windows console?
I found a guide online stating that you need to edit the registry in order to add new fonts to the list of available fonts in Command Prompt: specifically, you have to edit the key:
by adding string values with keys 00 , 000 , 0000 , and so on, with their values being the names of the fonts. I’ve already done this. I added the font names to the registry, as you can in the screenshot below, and restarted the computer:
However, the fonts which I’ve added aren’t showing up in the list. More specifically, I added Inconsolata and Source Code Pro. But I don’t see them in the list of available fonts:
What am I missing? I am using Windows 10 version 1803, build 17134.165.
1 Answer 1
How to add new fonts to your Powershell (Or CMD ) Console settings?
First thing to know, is that, unfortunately (!):
Only fonts fulfilling certain criteria can be installed into the console!
The Font Criteria + Explanation
(The current status of this is unknown.)
For Font to be supported in Console they have to:
- The font must be a fixed-pitch font.
- The font cannot be an italic font.
- If it is a TrueType font, it must be FF_MODERN .
- If it is not a TrueType font, it must contain the OEM_CHARSET .
- The font cannot have a negativeA or C space.
What does all that mean? Most of these metrics are defined here, which outlines the following structure describing a font in C++:
The font must be fixed-pitch. pitch and family of the font is described by the field lfPitchAndFamily . The two low-order bits specify the pitch of the font and can be one of the following values:
- DEFAULT_PITCH
- FIXED_PITCH
- VARIABLE_PITCH
The font cannot be italic. In other words, the lfItalic field must be set to false.
If it is a TrueType font, the lfPitchAndFamily field must contain the code for the FF_MODERN family, in bits 4 through 7. FF_MODERN describes fonts with a constant stroke width (i.e. monospace fonts), with or without serifs. Monospace fonts are usually modern. Pica, Elite, and CourierNew are examples.
If it is not a TrueType font, it’s charset must include OEM_CHARSET , as defined by the lfCharSet field in the tagLOGFONTA structure. That is, the font needs to be more than merely monospace. It also needs to support all the characters in the OEM code page, the 437 «OEM» characters of the IBM437 (OEM United States) char set as described here.
The font cannot have a negative A or C space. The width of a character is described by an ABC structure. The B spacing is the width of the character. The A spacing is how much space to leave on the left of the character, and the C spacing is how much margin to leave on the right.
Any character with a negative margin on the left or right is oversized the designated grid/raster. For example, a font with an overloaded W needs more space than the designated X pixel character width to properly draw the character. Obviously, fonts with oversized characters are not fixed-width.
However, one known font to work and that has been suggested because it supports a lot of useful glyphs and math, is DejaVu. Unfortunately it is not part of the Windows standard font selection and need to be installed manually.
If the font you need doesn’t already have a TrueType font file ( *.ttf ) or OpenType ( *.otf ), you will need to convert the SFD files into TTF (or OTF). To do so, you can use FontForge to import SFD and then generate the TTF.
Steps to install a TTF file using FontForge
- Install FontForge (hereafter «FF»)
- Run FF as Administrator
- Download the SFD font file(s) (For example: DejaVuSansMono.sfd.)
- Open the file with: File > Open and hit OK.
- Generate a TTF with: File > Generate Fonts. , then
- Select True Type in the drop-down, then
- Un-Select the Validate Before Saving option and hit Generate .
- Drag the resulting *.ttf file into the Windows Control Panel for Fonts found at:
( Control Panel\Appearance and Personalisation\Fonts ) or by: WIN+R and type: %windir%\fonts .
Done. The new font is now immediately available in your registry.
Load the new font(s) into the Console registry
Open a Powershell console as Administrator to do this.
However, you will not see the new font items, until:
- the registry has been reloaded into memory, so the only way is to either:
- reboot the computer or
- restart Windows Explorer .
- Restart your Powershell Console
- File a bug report to Windows
Powershell repoConsole repo and ask them to:
support proper Fonts with correct unicode glyphs.
Enjoy the many new and correct glyphs!
For example, try the 5/8th box :
[char]0x2585 # (U+2585)
WindowsConsoleFonts — A PS module for working with Console fonts in Windows that allow you to easily install any (?) font.
An informative Microsoft article about their font technolgy and how Font Linking works.
The Google Noto Project (Font) Noto Tools for the Python based merge_fonts.py.
One of the criteria mentions to have constant stroke width , this means that the (pseuod-horizontal) pen width is constant as shown here:
The Expand Stroke dialog gives you control over various aspects of the expansion process. First you can specify three types of pen nibs:
- A round pen, which is circular by default but may be transformed into an ellipse
- A rectangular pen, which is square by default but may be transformed into more traditional caligraphic nib shapes
- A polygonal pen – you can draw almost any convex polygon.
For circular and caligraphic pens you can chose a stroke width, how the ends of an open path should be drawn, and how the path should look when two splines (or lines) join which do not have the same slope (ie. at a corner point).