FontWeight#getWeight() totally broken
Try
System.out.println(FontWeight.THIN.getWeight());
System.out.println(FontWeight.BOLD.getWeight());
System.out.println(FontWeight.EXTRA_BOLD.getWeight());
System.out.println(FontWeight.SEMI_BOLD.getWeight());
all print zero
The one line fix:
felipe-mac:rt felipe$ hg diff modules/graphics/src/main/java/javafx/scene/text/FontWeight.java -w
diff -r 5feecc88645d modules/graphics/src/main/java/javafx/scene/text/FontWeight.java
--- a/modules/graphics/src/main/java/javafx/scene/text/FontWeight.java Fri Dec 13 16:37:19 2013 -0800
+++ b/modules/graphics/src/main/java/javafx/scene/text/FontWeight.java Mon Dec 16 12:33:55 2013 -0800
@@ -85,6 +85,7 @@
private final String[] names;
private FontWeight(int weight, String... names) {
+ this.weight = weight;
this.names = names;
}
Try
System.out.println(FontWeight.THIN.getWeight());
System.out.println(FontWeight.BOLD.getWeight());
System.out.println(FontWeight.EXTRA_BOLD.getWeight());
System.out.println(FontWeight.SEMI_BOLD.getWeight());
all print zero
The one line fix:
felipe-mac:rt felipe$ hg diff modules/graphics/src/main/java/javafx/scene/text/FontWeight.java -w
diff -r 5feecc88645d modules/graphics/src/main/java/javafx/scene/text/FontWeight.java
--- a/modules/graphics/src/main/java/javafx/scene/text/FontWeight.java Fri Dec 13 16:37:19 2013 -0800
+++ b/modules/graphics/src/main/java/javafx/scene/text/FontWeight.java Mon Dec 16 12:33:55 2013 -0800
@@ -85,6 +85,7 @@
private final String[] names;
private FontWeight(int weight, String... names) {
+ this.weight = weight;
this.names = names;
}