aspose file tools*
The moose likes Java in General and the fly likes How to change font and font size Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Reply locked New topic
Author

How to change font and font size

Justin Char
Ranch Hand

Joined: Mar 05, 2007
Posts: 76
// new Font("Serif", Font.PLAIN, 48); doesn't work ..
Program runs fine just want to change Center to different font and font size.
strOut = ("Center (DC), " + SavedTime);
Counter.write(strOut)
Counter.newLine();
Counter.newLine();

Just want to change the font of above text.

Thank You in advance. I have tried to figure this out for a long time.
I can't seem to find the answer. I am using buffered writer to write my adhoc report.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38865
    
  23
Where doesn't new Font work?
Why are you asking substantially the same question on two fora?
Can you change Fonts with a BufferedWriter at all? I don't think you can.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18570
    
    8

Text doesn't have a font, except if you have a context (like a GUI) where you can apply a font to text. If you have an "adhoc report" then you will have to learn how to specify fonts in the content of that report. Read the documentation for whatever interprets the data you send it.
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14150
    
  18

Please do not post the same question in multiple forums.


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to change font and font size