C#控制台字体 [英] C# console font
问题描述
我无法找出控制台应用程序默认使用哪种字体?是否保证每个人都有该字体(运行此.NET应用程序时)?想要显示一些unicode字符,需要确保它们存在于该字体中。
感谢
I cannot find out which font the console app uses by default? Is it guaranteed that everyone has that font (when running this .NET app)? Want to display some unicode chars and need to be sure they are present within that font. Thanks
推荐答案
如果要使用Unicode字符,我强烈建议避免使用控制台。尝试让控制台正确显示Unicode有很多问题。
I strongly recommend avoiding the Console if you want to use Unicode characters. There are many issues with trying to get the Console to display Unicode correctly.
控制台输出中不直接支持Unicode。最佳选择通常是设置控制台的代码页,需要P / Invoke。
Unicode is not directly supported in Console output. The best option is typically to set the console's code page, which will require P/Invoke.
话虽如此,GUI以更好的方式解决所有这些问题。如果你需要Unicode输出,我建议一个简单的GUI。
That being said, a GUI solves all of these issues, in a much nicer fashion. If you need Unicode output, I'd recommend a simple GUI.
这篇关于C#控制台字体的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!