Console Font Size

Started by
9 comments, last by Kaanin 17 years, 6 months ago
Hey ive been doin C++ for about a month or 2 now, and me and my friend are doin a small arcade style rpg for fun and learning and I got a small issue. In the console window you can right click the title bar choose proporties then font then 8 X 8 to get a nice perfectly square font ratio. Even better you can choose to apply this property every time it starts up. However it would be nice if there was a way to set this for the user so the player doesnt have to. Ive searched around an I cant seem to find a way to do it. Ive found every which way to change the window size, but not the font. Please help. Just incase your curious heres a pre alpha of the game executable, its not much content but Ive put alot of work into making the graphics and physics functions work well. Its getting close to where I can just sit back and make the game content. DungeonManIII.exe
Advertisement
You're right when you assume few players will do it manually. I didn't bother with it, and actually, it didn't look too bad. A better solution (and certainly easier) solution would be to use two characters per tile.

Bytheway, did you hardcode that level into the game? Since there's no level files around... Let's just say that while it may be easier at first, it's by far the most convenient solution. Spend some time writing level-loader code, so you can create levels as simple .txt files. Much more flexible in the end. :)
Oh, and the input is extremely sensitive...

I created an ascii prototype similar to this a while ago. It shows pretty well what I mean: game download and source. I hope it's of some use to you guys. :)
Create-ivity - a game development blog Mouseover for more information.
Using 2 characters per tile is out of the question.
* Implementing it would be a nightmare for the playstyle of this game.
* It would be even more of a nightmare if I tried to change my current setup to work that way, and I aint gonna delete all my work and start from scratch for a small project thats just for fun.
* lastly The resolution of the game would be too large for some of the stuff I plan on doing.

And the level is hardcoded, and not hardcoded at the same time. Technically its hardcoded because its in a .cpp file that is compiled, linked, and indeed hardcoded into the game. But its not really hardcoded because I have all the level information in its own file seperate from everything else, it mineaswell be a txt file off to the side except I havent taken the time to learn how to go about doing that yet and its just easier to make it a .cpp. Its the only level I got so far, ive spent all my time setting up the game ive had no time to create actual content. But that moment is close at hand.

btw fryball, interesting game, had no flippin clue how to play, did beat level 1 though, and uh, level 2 was interesting...
Oh yea and I know the controlls are a bit touchy, like I said its pre alpha, things are still not quite done yet. for now the shift key is for walking.

SO does anyone PLEASE have a way to code in the font size? PLEASE!?
BUMP!
Hey its been like a week this has been up and its got 96 views and is on page 5 but not a single response! I still need a solution to my delema.

Please reread the very first post to see my problem.

I know there are many console functionalty guru's here. Someones gotta know how to do it.
I don't know if this works but since you've bumped, you could have a look at SetCurrentConsoleFontEx.

I have no idea if this programmatically allows the changes you'd make via the tool bar of a console window and I can't really test it at the moment, but from a brief scan of MSDN, it might be what you are looking for.

HTH Paul
I couldn't even get it to run...
NisseBosseLasse what actually happend when you tried to run my game? Id like to know to see if theres anything I can do or change to make it work.

Easily Confused
Well I looked into it and the function you listed is windows vista only. So I will be able to use that in the future but not as of yet, Here's a small discussions about the whole thing.

There is a function that will return me the current font size but not change it. If worse comes to worse ill just make a loop that wont let you play the actual game till you change the settings. Then when windows Vista rolls around ill go back in and add in that fuctionality that does it automatically. But I would HATE to do that to my playerbase.

If there is another way please speak up. Thank you.
Maybe this is what you want?
Quote:Original post by BosskIn Soviet Russia, you STFU WITH THOSE LAME JOKES!
That looks incredibly promising, gimmy some time with it see if it works. Thank you very much. Crossing my fingers, I hope it works.
It says something about "The requested context isn't in the activation context" (or similar, the error is in swedish... :) ). I guess it has to do with missing library files on my part? Maybe a DLL or two?

This topic is closed to new replies.

Advertisement