aboutsummaryrefslogtreecommitdiff
path: root/src/share/classes/sun/font/FontFamily.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/share/classes/sun/font/FontFamily.java')
-rw-r--r--src/share/classes/sun/font/FontFamily.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/share/classes/sun/font/FontFamily.java b/src/share/classes/sun/font/FontFamily.java
index a0d8032494..322510f971 100644
--- a/src/share/classes/sun/font/FontFamily.java
+++ b/src/share/classes/sun/font/FontFamily.java
@@ -219,11 +219,11 @@ public class FontFamily {
case Font.PLAIN:
case Font.ITALIC:
return (newWeight <= Font2D.FWEIGHT_NORMAL &&
- newWeight > currFont.getWeight());
+ newWeight >= currFont.getWeight());
case Font.BOLD:
case Font.BOLD|Font.ITALIC:
- return (Math.abs(newWeight - Font2D.FWEIGHT_BOLD) <
+ return (Math.abs(newWeight - Font2D.FWEIGHT_BOLD) <=
Math.abs(currFont.getWeight() - Font2D.FWEIGHT_BOLD));
default: