Loj
Loj

Reputation: 1189

C# console font

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

Upvotes: 2

Views: 6162

Answers (2)

Reed Copsey
Reed Copsey

Reputation: 564323

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 is not directly supported in Console output. The best option is typically to set the console's code page, which will require P/Invoke.

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.

Upvotes: 9

Dave Markle
Dave Markle

Reputation: 97671

You can tell what font is being used by reading the registry value "0" from this key:

HKLM\Software\Microsoft\Windows NT\CurrentVersion\Console\TrueTypeFont

Upvotes: 1

Related Questions