Jono_2007
Jono_2007

Reputation: 63

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 from 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

Upvotes: 2

Views: 10975

Answers (7)

SimkaTheBoss
SimkaTheBoss

Reputation: 1

  1. Right Click the top bar of the window

    select top bar

  2. Click Properties

  3. Click Font and select your font size

select font size

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

Upvotes: 0

Andriy Tylychko
Andriy Tylychko

Reputation: 16266

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

Upvotes: 0

Tim
Tim

Reputation: 9172

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.

Upvotes: 6

Greg Hewgill
Greg Hewgill

Reputation: 993303

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.

Upvotes: 2

Colin Valliant
Colin Valliant

Reputation: 1929

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.

Upvotes: 3

siemanko
siemanko

Reputation: 1409

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.

Upvotes: 2

D.N.
D.N.

Reputation: 2170

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.

Upvotes: 3

Related Questions