< prev index next >

src/java.desktop/share/classes/sun/font/FontDesignMetrics.java

Print this page

        

*** 518,535 **** return (int) (0.5 + width); } /** * Gets the advance widths of the first 256 characters in the ! * <code>Font</code>. The advance is the * distance from the leftmost point to the rightmost point on the * character's baseline. Note that the advance of a ! * <code>String</code> is not necessarily the sum of the advances * of its characters. * @return an array storing the advance widths of the ! * characters in the <code>Font</code> ! * described by this <code>FontMetrics</code> object. */ // More efficient than base class implementation - reuses existing cache public int[] getWidths() { int[] widths = new int[256]; for (char ch = 0 ; ch < 256 ; ch++) { --- 518,535 ---- return (int) (0.5 + width); } /** * Gets the advance widths of the first 256 characters in the ! * {@code Font}. The advance is the * distance from the leftmost point to the rightmost point on the * character's baseline. Note that the advance of a ! * {@code String} is not necessarily the sum of the advances * of its characters. * @return an array storing the advance widths of the ! * characters in the {@code Font} ! * described by this {@code FontMetrics} object. */ // More efficient than base class implementation - reuses existing cache public int[] getWidths() { int[] widths = new int[256]; for (char ch = 0 ; ch < 256 ; ch++) {
< prev index next >