--- old/src/java.desktop/share/classes/javax/swing/SwingUtilities.java 2016-01-25 00:13:09.000000000 +0400 +++ new/src/java.desktop/share/classes/javax/swing/SwingUtilities.java 2016-01-25 00:13:08.000000000 +0400 @@ -1090,7 +1090,8 @@ (int) v.getPreferredSpan(View.X_AXIS)); textR.height = (int) v.getPreferredSpan(View.Y_AXIS); } else { - textR.width = SwingUtilities2.stringWidth(c, fm, text); + textR.width = SwingUtilities2.getTextUIDrawing(c) + .getStringWidth(c, fm, text); lsb = SwingUtilities2.getLeftSideBearing(c, fm, text); if (lsb < 0) { // If lsb is negative, add it to the width and later @@ -1108,7 +1109,8 @@ if (textR.width > availTextWidth) { text = SwingUtilities2.clipString(c, fm, text, availTextWidth); - textR.width = SwingUtilities2.stringWidth(c, fm, text); + textR.width = SwingUtilities2.getTextUIDrawing(c) + .getStringWidth(c, fm, text); } textR.height = fm.getHeight(); }