How to Change the Font Size

Jun 15, 2009 at 11:45pm
I am using Visual studio 6

I want to print a page through c++
I want some letter Bold and some of other sizes.

So can anyone tell me that how can i change my Font size and style as well.

THnaks
Jun 16, 2009 at 2:06am
if u want to change ur font style and colors or others, u go to tools menu in ur VS6 and choose Options then in Environment folder, select fonts and colors.
Jun 16, 2009 at 2:11pm
If i want to print my each and every line with differnet font size and style then what should i do?


thanks
Jun 16, 2009 at 2:20pm
Actualy i want to print a page of differnt font
Some lines with bold face and some with different size while in my printing through C++

so help me out plz
thanks
Jun 16, 2009 at 6:08pm
i dont think its possible
Jun 16, 2009 at 6:55pm
If it is, it's platform specific.
Jun 16, 2009 at 11:39pm
Why would you want to print each and every line with a different font size and style?

If you really want to mess with it that way, you should just import your cpp source file into Word or Open Office Writer (or whatever you use, WordStar, etc) and apply your styles for each line, then print it.

Alternately, you could write a program to read the source file and draw it using the Win GDI drawing functions and print the resulting canvas.

Good luck!
Jun 18, 2009 at 3:38pm
Actualy i want to print a page in which there are some headings which are bold and some lines are of small size and so on.

so plz someone tell me that how can i change the font size in C++ in my print page.

Thanks
Jun 18, 2009 at 6:31pm
I've already told you your two options.
Jun 18, 2009 at 8:01pm
Hi Pappu...
You have not yet clarified if you wanna print the OUTPUT in that way or the PROGRAM CODE in that way...
Jun 18, 2009 at 8:34pm
I was wondering if there is a way of formatting the output that I send to the console. I know about some of the justifications and precision formatting, but what about changing fonts or adjusting font size?
Jun 18, 2009 at 11:52pm
Well, technically it is possible, but only by cheating (by drawing directly on the console's DC). If you are interested in a silly hack like that then go for it. But it takes a bit of effort to keep the illusion alive.

I'm not sure whether the Win32 console supports the old EGA/VGA alternate character set feature... but that is another possibility.


In every real sense, just consider that you cannot have control over things like that in a console application. You need to draw to a canvas using the normal GDI functions.

Sorry.
Topic archived. No new replies allowed.