c语言改命令提示符字体大小_愚蠢的怪胎技巧:为Windows命令提示符启用更多字体...

c语言改命令提示符字体大小

c语言改命令提示符字体大小

Have you ever noticed that there are only two fonts to choose from in the Command prompt properties window? What you might not know is that you can use a simple registry hack to enable alternate fonts, including a very readable font that comes with Vista and Office 2007.

您是否注意到“命令提示符”属性窗口中只有两种字体可供选择? 您可能不知道的是,您可以使用简单的注册表黑客来启用替代字体,包括Vista和Office 2007附带的易读字体。

But that’s not all… you can enable a number of fixed width fonts if you really want to. We’ll cover how this works, as well as one of my favorite “interesting” fonts for the command prompt.

但这还不是全部……如果您确实愿意,可以启用多种固定宽度的字体。 我们将介绍它的工作方式,以及命令提示符下我最喜欢的“有趣”字体之一。

Changing the Default Command Prompt Font

更改默认命令提示符字体

To change the font, you’ll want to right-click on the title bar and choose Properties from the menu. If you want to set the defaults for all command prompt windows you can choose the Defaults option instead.

要更改字体,您需要右键单击标题栏,然后从菜单中选择“属性”。 如果要为所有命令提示符窗口设置默认值,则可以选择“默认值”选项。

image

Now on the font tab, you’ll be able to choose from any of the fonts that are enabled in the registry.

现在,在字体选项卡上,您可以从注册表中启用的任何字体中进行选择。

image

You’ll notice in my screenshot that I have the Consolas font enabled… which isn’t normally enabled by default, so keep reading on how to enable it!

您会在屏幕截图中注意到我启用了Consolas字体……通常默认情况下未启用它,因此请继续阅读如何启用它!

Enabling Additional Fonts for the Command Prompt

为命令提示符启用其他字体

In order to enable additional fonts in the command prompt, you’ll need to pull out your registry hacking skills and open up regedit.exe through the start menu search or run box, navigating down to the following key:

为了在命令提示符下启用其他字体,您需要使用注册表黑客技巧,并通过开始菜单搜索或运行框打开regedit.exe,向下导航至以下键:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Console\TrueTypeFont

HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows NT \ CurrentVersion \ Console \ TrueTypeFont

Once you get down to that key, you’ll see the list of enabled True Type fonts on the right-hand pane. To add another one, add a new string value named 00, and set the value to the name of the font you want to enable.

转到该键后,您将在右侧窗格中看到已启用的True Type字体的列表。 要添加另一个,请添加一个名为00的新字符串值,并将该值设置为要启用的字体的名称。

Note that you will have to reboot your computer before you can then use the new font in the command prompt.

请注意,您必须先重新启动计算机,然后才能在命令提示符下使用新字体。

image

You’ll see here that I enabled the Consolas font by using that as the value. This font is included by default on any machine that has Vista or Office 2007, but if you are using XP you can just install the free Powerpoint 2007 Viewer which contains the fonts.

您将在此处看到我通过使用Consolas字体作为值来启用它。 在装有Vista或Office 2007的任何计算机上,默认情况下都包含此字体,但是,如果您使用的是XP,则可以安装包含这些字体的免费Powerpoint 2007 Viewer

font-consolas

Even at really small font sizes, Consolas is quite readable.

即使字体很小,Consolas还是很可读的。

What Fonts Can I Enable?

我可以启用哪些字体?

The command prompt will only accept fonts that are fixed-width, so don’t even bother trying to enable Comic Sans =) I started looking around on various font websites and found a few fonts that worked, like this White Rabbit font that has a fun look:

该命令提示符将仅接受固定宽度的字体,因此,甚至不必费心尝试启用Comic Sans =)。我开始在各种字体网站上四处查看,发现了一些可以工作的字体 ,例如具有“有趣的外观:

font-whiterabbit

To enable an additional font like that one while still keeping Consolas enabled, you’ll first need to download and install the font (right-click on it and choose Install), and then go back into the registry and add a new key, making sure to give it a different name (I used 00 and 000, but you could use 00, 01, 02, etc).

要在启用Consolas的同时启用其他字体,您首先需要下载并安装该字体(右键单击它并选择Install),然后返回注册表并添加新的密钥,请确保使用其他名称(我使用00和000,但可以使用00、01、02等)。

image

Once you’ve enabled both of the fonts you should be able to choose between them in the Font tab like before (remember you have to reboot for them to actually work).

启用这两种字体后,您应该能够像以前一样在“字体”选项卡中进行选择(请记住,必须重新引导它们才能正常工作)。

image

Some fonts don’t work, however… I tried quite a few fixed-width fonts that gave me an error when I tried to open the properties window:

某些字体不起作用,但是…我尝试了很多固定宽度的字体,这些字体在尝试打开属性窗口时给我一个错误:

font-size-error

If this happens to you, don’t worry… just go back into the registry and remove the item. Still, a rather fun trick… anybody remember vfont from the DOS days?

如果您遇到这种情况,请不要担心……只需返回注册表并删除该项目。 仍然是一个相当有趣的把戏……有人记得DOS时代的vfont吗?

翻译自: https://www.howtogeek.com/howto/windows-vista/stupid-geek-tricks-enable-more-fonts-for-the-windows-command-prompt/

c语言改命令提示符字体大小

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值