开发者

Is there a way to make c++ console text larger?

I'm making a random number generator, the program will create several random numbers and then choose fro开发者_高级运维m those random numbers and then displays that number in the window.

I was wondering if there was a way to make that specific piece of text bigger? I don't want to change the size of all of the text in the window as I have writing in the window that i don't want to change the size of

Thanks for any help you can give


No, but you can make it bold, change the font color, or the background color for the specific text. If all you want is to make that specific piece of text stand out, I'd go with colorizing it.

As for how to do that... It's platform dependent. What platform are you on? Windows? Linux? What shell?

Take a look at the Windows Console API. That should have what you need.


Console text doesn't allow for the rich formatting you are referring to. You would have to move to a graphical output to render the size differences.


Generally, programs can't control the size of the text in the terminal. You may be able to change the color of a specific part of the text, though. Search for terminal escape sequences for information on how to do that on various terminals. Some terminals also handle bold, italics, and underlining.


No, but instead you can change colors of text and text's background. Will this be a good solution for your problem? There are a lot of specific examples available in the internet.


A possible console mode solution could involve FIGlet. You can tweak the output to write in many different fonts.

The output is larger, but no guarantee that it's suitable for your application.


open your console app, go to system menu of console window (left top corner, right click), font tab, choose what you wish. next time you open this (!) console app the font will be as you selected, other console windows are not affected


  1. Right Click the top bar of the window

    Is there a way to make c++ console text larger?

  2. Click Properties

  3. Click Font and select your font size

Is there a way to make c++ console text larger?

This isn't through the code but it will help for your pc.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜