#### Archived

This topic is now archived and is closed to further replies.

# Console programming woes

This topic is 6132 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I''m working on a text based game that has to use the Windows Console and I would like to have more characters available to me than the standard ascii set. I know the Console supports unicode (at least for NT it does) and I would like to use it, however the font for the console does not support any more than the ascii equivilants in the unicode characters set. Is there any way to load another font for use in the Windows Console (specifically Lucida Sans Unicode, which is standard in NT) and if so how? If not, is there at least a way to select the Lucida Console font that you can use via the console properties? Also, I''ve been searching the web for references dedicated to console programming but have come up empty, please share any good links you may have. Thanks everyone, D

##### Share on other sites
Ok, I pretty much figure you can''t load any other fonts into the console, but I would still like to try and use Lucida Console, which is one of the two fonts you can choose in the Console properties. The MSDN mentions a structure called CONSOLE_FONT_INFO, but I can''t seem to find it anywhere. It''s suposed to be in wincon.h. I''m using the platform sdk from June 2001, was it included later or is one of M\$''s employees smoking crack?

Thanks
D

##### Share on other sites
I don''t know if you can in Win32 Console apps, but you can in DOS apps. You can also have animated characters and stuff.

##### Share on other sites
CONSOLE_FONT_INFO is defined in the August 2001 Platform SDK. It is available only on Windows XP and .NET Server.

  typedef struct _CONSOLE_FONT_INFO { DWORD nFont; COORD dwFontSize;} CONSOLE_FONT_INFO, *PCONSOLE_FONT_INFO;

But if I can suggest something... Why not write a small windows dialog box to serve as the main window of your game? I know it would change up your plans / designs a bit, but it may give you the flexibility you need and allow it to run on Windows 9X / NT / 2K.

Good luck.

##### Share on other sites
Yeah,

Have to watch. NT''s (and 2000 as well as XP) use a different console program shell than Windows 9x. Windows 9x exposed just about complete DOS compatibility, but I''m pretty sure NT doesn''t.

You might want to look into Character-Mode Applications through the Win32 API.

Check out:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/conchar_1mcz.asp

You might end up creating a Win32 application and have it display your console for you (not using the console app option in VC++).

You can also find some information using the Win32 console using Perl. I did so once before long ago for some basic output during a long DB conversion (to make my silly ex-boss happy that it looked _professional_...he didn''t like the text logs lol). Anyways, I digress and regress.

I think the console works as a little window and so has events as well, so you can do some more advanced stuff as well.

I didn''t right away find any font related info, but probably some out there.

G''luck.

R

##### Share on other sites
I only wish I could use a dialog box instead of a console program but those restrictions have to stay And according to the MSDN on MS''s site, CONSOLE_FONT_INFO is compatable with
NT and 98 as well, I''ll check out the latest sdk.

Thanks everyone.
D

1. 1
Rutin
49
2. 2
3. 3
4. 4
5. 5

• 11
• 16
• 9
• 10
• 13
• ### Forum Statistics

• Total Topics
633003
• Total Posts
3009846
• ### Who's Online (See full list)

There are no registered users currently online

×