提交 c062ae81 编写于 作者: I igor

6761856: OpenJDK: vertical text metrics may be significanly different from...

6761856: OpenJDK: vertical text metrics may be significanly different from those returned by Sun JDK
Reviewed-by: bae, prr
上级 6f0a576b
......@@ -1281,7 +1281,7 @@ Java_sun_font_FreetypeFontScaler_getGlyphOutlineBoundsNative(
sunFontIDs.rect2DFloatClass,
sunFontIDs.rect2DFloatCtr4,
F26Dot6ToFloat(bbox.xMin),
F26Dot6ToFloat(bbox.yMax),
F26Dot6ToFloat(-bbox.yMax),
F26Dot6ToFloat(bbox.xMax-bbox.xMin),
F26Dot6ToFloat(bbox.yMax-bbox.yMin));
}
......
......@@ -22,7 +22,7 @@
*/
/* @test
* @summary verify TextLayout.getBounds() return visual bounds
* @bug 6323611
* @bug 6323611 6761856
*/
import java.awt.*;
......@@ -39,10 +39,15 @@ public class TextLayoutBounds {
Rectangle2D tlBounds = tl.getBounds();
GlyphVector gv = f.createGlyphVector(frc, s);
Rectangle2D gvvBounds = gv.getVisualBounds();
Rectangle2D oBounds = tl.getOutline(null).getBounds2D();
System.out.println("tlbounds="+tlBounds);
System.out.println("gvbounds="+gvvBounds);
System.out.println("outlineBounds="+oBounds);
if (!gvvBounds.equals(tlBounds)) {
throw new RuntimeException("Bounds differ");
throw new RuntimeException("Bounds differ [gvv != tl]");
}
if (!tlBounds.equals(oBounds)) {
throw new RuntimeException("Bounds differ [tl != outline]");
}
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册