Two Laptop Bag
The moose likes Swing / AWT / SWT and the fly likes How to make rotated text Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "How to make rotated text "look good"" Watch "How to make rotated text "look good"" New topic

How to make rotated text "look good"

Bill Doss

Joined: Jan 26, 2012
Posts: 7
My question is not about how to rotate text with Java2D; I know how to do that. What I don't know is how to make the rotated text "look good." For example, if you create a text box in PowerPoint and rotate it, the text appears sharp and clear no matter the rotation angle. However, text drawn with g2D.drawString() looks okay at 0 or 90 degrees but not so good at other angles. This is especially so for smaller fonts. Is there a way to manipulate the text to clean or sharpen it up? I've tried using:

but that didn't help. Below is a little program that illustrates what I'm talking about. The bigger font isn't too bad when rotated but still doesn't look very professional. The smaller font when rotated is terrible. If someone could point me to where look to learn how make the text look sharp at any angle, I would be so very thankful.


I agree. Here's the link:
subject: How to make rotated text "look good"
It's not a secret anymore!