News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Changing the font and the font size of a console via API

Started by frktons, December 18, 2012, 09:48:28 AM

Previous topic - Next topic

jj2007

Quote from: Vortex on December 19, 2012, 05:17:54 AM
Changing Console Fonts :

http://blogs.microsoft.co.il/blogs/pavely/archive/2009/07/23/changing-console-fonts.aspx

Good link. I thought of using Dave's enumeration together with SetConsoleFont, but it is still unclear to me how to get from the enum to having the index that SetConsoleFont asks for.

Donkey

Quote from: jj2007 on December 19, 2012, 05:26:38 AM
Good link. I thought of using Dave's enumeration together with SetConsoleFont, but it is still unclear to me how to get from the enum to having the index that SetConsoleFont asks for.

Tough call since Microsoft has been actively eliminating everything that allows you to manipulate the console fonts programmatically since Windows 2000. If you do find a way there is little guarantee that it will survive a service pack let alone a version upgrade. Microsoft decided years ago that allowing programmatic changes introduced far too much instability in the console has been removing it.

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

QuoteIn Windows 2000, the installation of Console Fonts is no longer automated. This was done to give the console window greater stability in multilanguage environments.
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable

dedndave

#17
my enum code uses EnumFontFamiliesEx
that may not be the best choice for what you want to do

there is EnumFonts(Ex) and, perhaps, GetFontData
beyond that, you may have to select a font into a DC in order to get more info

as you can see from the lucida console font, true-type font files can embed mono-space fonts
the font is both true-type and mono-space   :P
if you get really interested, you can research info on how to create font files

personally, i think it is way too much effort to put into a console app - lol