Hi Prasanta, Looks good to me
Regards, Pankaj -----Original Message----- From: Phil Race Sent: Tuesday, September 4, 2018 11:12 PM To: Prasanta Sadhukhan Cc: [email protected] Subject: Re: <Swing Dev> [12] JDK-8202013: JEditorPane shows large HTML unordered list bullets +1 -phil. On 09/04/2018 12:52 AM, Prasanta Sadhukhan wrote: > Modified webrev caching the original antialias state and restoring it > at the end > > http://cr.openjdk.java.net/~psadhukhan/8202013/webrev.1/ > > Regards > Prasanta > On 9/4/2018 4:58 AM, Philip Race wrote: >> >> >> On 9/3/18, 12:24 AM, Prasanta Sadhukhan wrote: >>> Hi All, >>> >>> Please review a fix for an issue where it is seen that when >>> displaying an HTML unordered list in a JEditorPane, the bullets >>> generated by <li> looks larger than needed relative to text font >>> size as seen in >>> https://www.dropbox.com/s/onv6v5xzutnvuyz/large-text-bullets.png?dl= >>> 0 >>> >>> This is because the StyleSheet#drawShape() routine hardcodes the >>> bullet size to 8 which might look larger relative to some font size >>> and smaller compared to larger font size. >>> Ideally, the bullet size should be relative to text font size. >>> Proposed fix is to make sure the bullet size is relative to text >>> font size. >>> I have used bullet size to be 1/3rd of text font size as >>> https://www.w3schools.com/html/html_lists.asp "An Unordered List" >>> bullets size comparison to text looks similar and I could not find >>> any docs stating what should be the ideal bullet size relative to >>> font. >> >> I expect it is allowed to display a bullet using a font. >> The exact size would be out of control of the app. >>> >>> Also, the fix takes into account the bullet is shown in middle to >>> text lists, whereas previously, it is at the bottom (although we >>> could not figure it out as the bullet size was large) >>> >>> Bug: https://bugs.openjdk.java.net/browse/JDK-8202013 >>> webrev: http://cr.openjdk.java.net/~psadhukhan/8202013/webrev.0/ >>> >>> This also fixes JDK-8201925: JEditorPane unordered list bullets look >>> pixelated by using antialiasing to make the bullet shape smoother. >> >> Same comment as the other fix .. you should leave the graphics state >> as you found it. >> >> -phil. >>> >>> Regards >>> Prasanta >>> >
