Java vertical string


To create a vertical string using the Graphics2D, use the following function to get a vertical font...

Code: (Java)

private java.awt.Font getVerticalFont(java.awt.Font source) {
// Create a rotation transformation for the font.
java.awt.geom.AffineTransform at = new java.awt.geom.AffineTransform();

// turn 90 degrees to the left (right-most part goes up)...

// create the vertical font
return source.deriveFont(at);

Hope it helps ya :)