--- ./openjdk-old/jdk/test/java/awt/font/TextLayout/TextLayoutAscentDescent.java	2013-04-26 11:51:19.000000000 +0200
+++ ./openjdk/jdk/test/java/awt/font/TextLayout/TextLayoutAscentDescent.java	2013-04-26 11:51:19.000000000 +0200
@@ -0,0 +1,46 @@
+/*
+ * Copyright 2013 Red Hat, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+import java.awt.Font;
+import java.awt.font.TextLayout;
+import java.awt.font.FontRenderContext;
+
+/**
+ * @test
+ * @run main TextLayoutAscentDescent
+ * @author Pavel Tisnovsky
+ *
+ * Test if TextLayout's methods getAscent() and getDescent() work properly.
+ */
+public class TextLayoutAscentDescent {
+    public static void main(String []args) {
+        Font font = new Font("Times New Roman", Font.BOLD, 10);
+        TextLayout tl = new TextLayout("JAVA", font, new FontRenderContext(null, false, false));
+
+        float ascent = tl.getAscent();
+        float descent = tl.getDescent();
+        if (ascent <= 0) {
+            throw new RuntimeException("Ascent " + ascent + " is <=0");
+        }
+        if (descent <= 0) {
+            throw new RuntimeException("Descent " + descent + " is <=0");
+        }
+    }
+}
+
--- ./openjdk-old/jdk/test/java/awt/font/TextLayout/TextLayoutBoundIsNotEmpty.java	2013-04-29 15:24:56.000000000 +0200
+++ ./openjdk/jdk/test/java/awt/font/TextLayout/TextLayoutBoundIsNotEmpty.java	2013-04-29 15:24:56.000000000 +0200
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2013 Red Hat, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+import java.awt.Font;
+import java.awt.font.TextLayout;
+import java.awt.font.FontRenderContext;
+import java.awt.geom.Rectangle2D;
+
+/**
+ * @test
+ * @run main TextLayoutBoundIsNotEmpty
+ * @author Pavel Tisnovsky
+ *
+ * Test if TextLayout's method getBounds() works properly.
+ */
+public class TextLayoutBoundIsNotEmpty {
+    public static void main(String []args) {
+        Font font = new Font("Times New Roman", Font.BOLD, 10);
+        TextLayout tl = new TextLayout("JAVA", font, new FontRenderContext(null, false, false));
+        Rectangle2D bounds = tl.getBounds();
+
+        if (bounds.isEmpty()) {
+            throw new RuntimeException("Bounds is empty: " + bounds.toString());
+        }
+    }
+}
+
--- ./openjdk-old/jdk/test/java/awt/font/TextLayout/TextLayoutGetPixelBounds.java	2013-04-29 15:24:56.000000000 +0200
+++ ./openjdk/jdk/test/java/awt/font/TextLayout/TextLayoutGetPixelBounds.java	2013-04-29 15:24:56.000000000 +0200
@@ -0,0 +1,52 @@
+/*
+ * Copyright 2013 Red Hat, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+import java.awt.Font;
+import java.awt.font.TextLayout;
+import java.awt.font.FontRenderContext;
+import java.awt.geom.Rectangle2D;
+
+/**
+ * @test
+ * @run main TextLayoutGetPixelBounds
+ * @author Pavel Tisnovsky
+ *
+ * Test if TextLayout's method getPixelBounds() works properly.
+ */
+public class TextLayoutGetPixelBounds {
+    public static void main(String []args) {
+        Font font = new Font("Times New Roman", Font.BOLD, 10);
+        FontRenderContext fontRenderContext = new FontRenderContext(null, false, false);
+        TextLayout tl = new TextLayout("JAVA", font, fontRenderContext);
+
+        Rectangle2D bounds = tl.getPixelBounds(fontRenderContext, 0.0f, 0.0f);
+        int width = (int) bounds.getWidth();
+        int height = (int) bounds.getHeight();
+        if (width <= 0) {
+            throw new RuntimeException("Width " + width + " is <=0");
+        }
+        if (height <= 0) {
+            throw new RuntimeException("Height " + height + " is <=0");
+        }
+        if (bounds.isEmpty()) {
+            throw new RuntimeException("Bounds is empty: " + bounds.toString());
+        }
+    }
+}
+
