Skip to content
Permalink
Browse files
8244113: [TESTBUG] java/awt/font/Rotate/RotatedSyntheticBoldTest.java…
… test comments interpreted as args

Reviewed-by: serb
  • Loading branch information
Phil Race committed May 1, 2020
1 parent 26e37d1 commit b938a4c5ed49852b22d371cbd76f98fa8eaa6614
Showing with 9 additions and 4 deletions.
  1. +9 −4 test/jdk/java/awt/font/Rotate/RotatedSyntheticBoldTest.java
@@ -23,11 +23,13 @@

/*
* @test RotatedSyntheticBoldTest
* @bug 8233006
* @bug 8233006 8244113
* @summary This test verifies that rotated synthetically bolded fonts
* do not have a wandering baseline
* @run main RotatedSyntheticBoldTest
*
*/

/*
* Note this is designed to be run headless. The creation of the UI
* is meant to be run outside the harness as an visualisaton aid to
* debugging any failure.
@@ -74,8 +76,8 @@ public static void main(String[] args) throws Exception {
}
}

static void createUI() {
SwingUtilities.invokeLater(() -> {
static void createUI() throws Exception {
SwingUtilities.invokeAndWait(() -> {
JFrame frame = new JFrame("Synthetic Text Test");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.add(new RotatedSyntheticBoldTest());
@@ -151,6 +153,9 @@ static void doTest() {
boolean failed = false;
for (String s : families) {
Font font = new Font(s, Font.BOLD, 20);
if (font.canDisplayUpTo(TEXT) != -1) {
continue;
}
g2d.setFont(font);
GlyphVector gv = font.createGlyphVector(frc, TEXT);
Rectangle2D r = gv.getVisualBounds();

0 comments on commit b938a4c

Please sign in to comment.