C# 如何在控制台应用程序中更改 Console.Writeline(text) 输出文本字体大小
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/16885641/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to Change the Console.Writeline(text) output text font size in a Console App
提问by user2445628
As an example, we have text such as "Hello World!". I use Console.Writeline("HelloWorld!") and "HelloWorld!" prints in a console app. Is there any way to print "HelloWorld!" larger in a console app?
例如,我们有诸如“Hello World!”之类的文本。我使用 Console.Writeline("HelloWorld!") 和 "HelloWorld!" 在控制台应用程序中打印。有没有办法打印“HelloWorld!” 在控制台应用程序中更大?
回答by MordechayS
Text colors and background colors can be changed quite easily. Look here: http://www.dotnetperls.com/console-color. Font, is a bit 'undercover', though. Look here: possible to get/set console font size in c# .net?Good luck!
文本颜色和背景颜色可以很容易地改变。看这里:http: //www.dotnetperls.com/console-color。不过,字体有点“卧底”。看这里:可能在 c# .net 中获取/设置控制台字体大小?祝你好运!
回答by vince
Im on Windows 10: run your program and when the console window comes up, right click on the console window (on the top portion where the file name is) and select Properties. You can change your fonts and window size there. Close and rerun program and BINGO...all done.
我在 Windows 10 上:运行你的程序,当控制台窗口出现时,右键单击控制台窗口(在文件名所在的顶部)并选择属性。您可以在那里更改字体和窗口大小。关闭并重新运行程序和宾果游戏……一切都完成了。
Note: The font changes you make are not permanent. You may have to make them again depending on how you use the console.
注意:您所做的字体更改不是永久性的。根据您使用控制台的方式,您可能需要重新制作它们。
回答by ALEX
You have to make a right-click on the line title of an output window. Select properties and change the font, size or background color.
您必须右键单击输出窗口的行标题。选择属性并更改字体、大小或背景颜色。

