Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to make rotated text "look good"  RSS feed

Bill Doss
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.


It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!