Change DOS Font

Started by
9 comments, last by GamerCon 19 years, 5 months ago
I'm working on an RPG/Adventure DOS game and want to use a custom font. What would I need to do in order to programaticaly set DOS's font when the program is run and to set it back to DOS's default properties when the program is closed?
OS: WinXP HECOMPILER: DevC++ mingw32Programming since 10/3/2004 6:15:36 PMCurrent Project: An un-named MUDCompleted Projects:Tic-Tac-Toe (w32 console)PacMan (w32 console)Tetris (w32 console)Minesweeper (Allegro)BomberMan (Allegro)Chat Client (w32 console)
Advertisement
Is it an actual DOS program or a win32 console program? If it is the latter, I don't think you can (you'd have to instead make a fake console and simulate all the console stuff yourself). If it is a true DOS program, I have the interrupts required lying around somewhere and can dig them up for you.
"Walk not the trodden path, for it has borne it's burden." -John, Flying Monk
im not positive, the only command promt on my OS(WinXP) is cmd.exe

Im coding in C++ and compiling with DevC++(if that helps any)
OS: WinXP HECOMPILER: DevC++ mingw32Programming since 10/3/2004 6:15:36 PMCurrent Project: An un-named MUDCompleted Projects:Tic-Tac-Toe (w32 console)PacMan (w32 console)Tetris (w32 console)Minesweeper (Allegro)BomberMan (Allegro)Chat Client (w32 console)
Sorry to say, but I think the compiler with Dev-C++ only makes windows console programs, which means you can't change the font. The best you could do would be to make a full windows program and make a window that looks like a console, and then you could draw whatever you want to it.
"Walk not the trodden path, for it has borne it's burden." -John, Flying Monk
hmm, maybe I could code something that moves the orriginal font file to a temp folder and replaces it with a diffrent font file with the same name?
OS: WinXP HECOMPILER: DevC++ mingw32Programming since 10/3/2004 6:15:36 PMCurrent Project: An un-named MUDCompleted Projects:Tic-Tac-Toe (w32 console)PacMan (w32 console)Tetris (w32 console)Minesweeper (Allegro)BomberMan (Allegro)Chat Client (w32 console)
That would be a bad idea, because if your program crashed or was closed from control-alt-delete or anything like that, the person would be left with a strange console font.
"Walk not the trodden path, for it has borne it's burden." -John, Flying Monk
true but, thats no serious issue which couldnt be fixed with a readme.txt, faq and/or a loading screen which clearly states what to do if such a situation occured.

Plus I only want to change the extended fonts so it wouldnt be that big of a deal if the game was closed improperly.
OS: WinXP HECOMPILER: DevC++ mingw32Programming since 10/3/2004 6:15:36 PMCurrent Project: An un-named MUDCompleted Projects:Tic-Tac-Toe (w32 console)PacMan (w32 console)Tetris (w32 console)Minesweeper (Allegro)BomberMan (Allegro)Chat Client (w32 console)
When you say DOS, do you mean a text-console game?

[Edited by - kordova on October 24, 2004 6:24:35 PM]
pdcurses.

gl hf
Quote:Original post by flangazor
pdcurses.

gl hf
I just took a look into the source for that, and I found a 'get_font' and 'set_font' function, which change the font _SIZE_ but not the font itself. Also, both functions do nothing in the win32 version.
"Walk not the trodden path, for it has borne it's burden." -John, Flying Monk

This topic is closed to new replies.

Advertisement