The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: topspin on January 21, 2011, 05:05:17 PM

Title: who knows.....
Post by: topspin on January 21, 2011, 05:05:17 PM
is it possible to use ttf fonts in console applications?
Title: Re: who knows.....
Post by: Neil on January 21, 2011, 05:20:57 PM
You can change the Console font in the registry :-

Hive: HKEY_CURRENT_USER
Key: Console
Name: FaceName
Type: REG_SZ
Value: put the name of the font here, it must be installed on the system.
Title: Re: who knows.....
Post by: topspin on January 21, 2011, 05:28:44 PM
needs to use ttf chess font for console program  can i use it ? can i change console font programmatically?
Title: Re: who knows.....
Post by: Neil on January 21, 2011, 05:29:10 PM
Not sure if that works on later editions of windows?
Title: Re: who knows.....
Post by: redskull on January 21, 2011, 05:29:18 PM
There's some very specific requirements that must be met; somewhere there is a link to a MSDN article that lists them.  Generally, only 'console-like' fonts can be used (fixed space, etc).  I like DejaVu Sans Mono, personally.

-r

http://blogs.msdn.com/b/oldnewthing/archive/2007/05/16/2659903.aspx
Title: Re: who knows.....
Post by: topspin on January 21, 2011, 05:32:16 PM
so chess ttf fonts is impossible to use?
Title: Re: who knows.....
Post by: redskull on January 21, 2011, 05:35:03 PM
You would have to check the font itself for it's criteria, against the list here.  My first instinct would be to say it's not possible

http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q247815

Title: Re: who knows.....
Post by: topspin on January 21, 2011, 05:38:38 PM
but is it possible to use images in console apps then?
Title: Re: who knows.....
Post by: redskull on January 21, 2011, 05:43:28 PM
The console is for text mode; emphasis on 'text'.  Why not just write your chess game the real way?
Title: Re: who knows.....
Post by: topspin on January 21, 2011, 05:45:56 PM
there's a very complucated way of creating a window(
Title: Re: who knows.....
Post by: brethren on January 21, 2011, 07:05:12 PM
Quote from: topspin on January 21, 2011, 05:45:56 PM
there's a very complucated way of creating a window(

the use something simple like SDL to create the window :U

japheth has converted the header files to inc. use them in conjunction with japheths WinInc files
http://www.japheth.de/
some tutorials for using SDL. they are C tutorials but its simple to extrapolate
http://lazyfoo.net/SDL_tutorials/index.php