[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-2d-dev
Subject:    [OpenJDK 2D-Dev] [PATCH] Re: JDK-8012351
From:       Ryan Tandy <rtandy () sd63 ! bc ! ca>
Date:       2014-01-21 17:34:41
Message-ID: 52DEAFB1.2020907 () sd63 ! bc ! ca
[Download RAW message or body]

[Attachment #2 (multipart/mixed)]


Dear JDK team,

Further to my earlier message, please find attached the patch that I
think solves JDK-8012351. I applied this change to the Ubuntu JDK7
package and made it available at the Launchpad bug for testing; so far
one other user commented that it works for them.

Can JDK-8012351 be re-opened and this change considered as part of a
possible fix?

--=20
Ryan Tandy - Programmer/Analyst           rtandy@sd63.bc.ca
School District 63 (Saanich)                +1 250 652 7385

["lp937200.diff" (text/x-patch)]

--- openjdk/jdk/src/share/classes/sun/font/SunFontManager.java~	2013-06-21 13:46:14.000000000 -0700
+++ openjdk/jdk/src/share/classes/sun/font/SunFontManager.java	2014-01-06 20:52:18.030019086 -0800
@@ -763,7 +763,7 @@
             if (family == null) {
                 family = new FontFamily(familyName, false, rank);
                 family.setFont(f, f.style);
-            } else if (family.getRank() >= rank) {
+            } else {
                 family.setFont(f, f.style);
             }
             fullNameToFont.put(fontName.toLowerCase(Locale.ENGLISH), f);
@@ -854,7 +854,7 @@
                 if (family == null) {
                     family = new FontFamily(familyName, false, rank);
                     family.setFont(newFont, newFont.style);
-                } else if (family.getRank() >= rank) {
+                } else {
                     family.setFont(newFont, newFont.style);
                 }
                 return newFont;
--- openjdk/jdk/src/share/classes/sun/font/FontFamily.java~	2013-06-21 13:46:14.000000000 -0700
+++ openjdk/jdk/src/share/classes/sun/font/FontFamily.java	2014-01-07 09:12:44.093151820 -0800
@@ -106,7 +106,7 @@
     }
 
     public void setFont(Font2D font, int style) {
-        if (font.getRank() > familyRank) {
+        if (font.getRank() < familyRank) {
             if (FontUtilities.isLogging()) {
                 FontUtilities.getLogger()
                                   .warning("Rejecting adding " + font +

["signature.asc" (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic