dcsimg
How to print a String in a nice looking way like windows does?
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Jan_Plasqui
Posted On:   Thursday, September 13, 2001 05:45 AM


How can you print (java.awt.print.*) a string in a nice looking way like you get when using a wordpad-like text editor?



I am trying to print a mixture of geometrical shapes and some text but drawString(String str, int x, int y) prints ugly pixellated text instead of smoothly curved characters. I tried using textantialiasing RenderingHints but that gave a blury unreadable result.
Any ideas on how to improve the print quality?

Re: How to print a String in a nice looking way like windows does?

Posted By:   Christopher_Schultz  
Posted On:   Thursday, September 13, 2001 12:00 PM

The reason the text looks ugly is because the default font for the Graphics object is butt-ugly.



Try setting the font for the region using Graphics.setFont(Font) and then using Graphics.drawString(...) to draw your characters.



Hope that helps,

-chris
About | Sitemap | Contact