<Swing Dev> [10] RFR JDK-8178025:HiDPI with non-integer scale factor - SPANs in HTML are rendered overlapping each other
    Prasanta Sadhukhan 
    prasanta.sadhukhan at oracle.com
       
    Wed Oct 11 09:43:37 UTC 2017
    
    
  
Hi All,
Please review a fix for an issue whereby, when using a non-integer 
resolution (e.g. 225%) for a HiDPI display,
the Swing HTML rendering incorrectly calculates the width of SPAN 
elements which results in SPANs being
incorrectly positioned and overlapping with each other.
Issue was, when a JLabel with an html text is created, the 
GlyphPainter1.getSpan() uses a FontrenderedContext with transform scale 1
and also the obtained width is converted to int and not to float.
Proposed fix is to use correct transform while calculating the string 
width and also use floating point API to get floating point width.
webrev:http://cr.openjdk.java.net/~psadhukhan/8178025/webrev.00/
Bug: https://bugs.openjdk.java.net/browse/JDK-8178025
Regards
Prasanta
    
    
More information about the swing-dev
mailing list