<AWT Dev> RFR [XS] : 8207941 : javax/swing/plaf/basic/BasicGraphicsUtils/8132119/bug8132119.java fails on machines without Arial font [testbug]

Prasanta Sadhukhan prasanta.sadhukhan at oracle.com
Fri Jul 20 08:56:58 UTC 2018


Looks good to me. BTW, did you test on latest ubuntu and solaris?

Please add the bugid to the test.

Regards
Prasanta
On 7/20/2018 1:21 PM, Baesken, Matthias wrote:
>
> Hello,  the test 
> javax/swing/plaf/basic/BasicGraphicsUtils/8132119/bug8132119.java
>
> does not work on some of our  Linux and AIX machines .
>
> Reason is that the test in case of absence of font “Arial”  on the 
> system ,  chooses  just the first font  from  the 
>  AvailableFontFamilyNames  .
>
> 280     private static Font getFont() {
>
> 281     GraphicsEnvironment ge = 
> GraphicsEnvironment.getLocalGraphicsEnvironment();
>
> 282         String[] fontNames = ge.getAvailableFontFamilyNames();
>
> 283         String fontName = fontNames[0];
>
> 284         for (String name : fontNames) {
> 285             if ("Arial".equals(name)) {
> 286                 fontName = name;
> 287                 break;
> 288             }
> 289         }
> 290         return new Font(fontName, Font.PLAIN, 30);
> 291     }
> 292
>
> However  this first font might not be a good choice  that works  with 
> the tests  in   bug8132119.java  .
>
> So  we better  provide some  reasonable  fallbacks  that  were  
> available and  working on   our  test systems .
>
> Please review this adjustment :
>
> http://cr.openjdk.java.net/~mbaesken/webrevs/8207941.0/ 
> <http://cr.openjdk.java.net/%7Embaesken/webrevs/8207941.0/>
>
> https://bugs.openjdk.java.net/browse/JDK-8207941
>
> Thanks, Matthias
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/awt-dev/attachments/20180720/c48c43af/attachment-0001.html>


More information about the awt-dev mailing list