New JavaFX default font (Amble Condensed) looks ugly!
- April 28th, 2010
- Write comment
Updates: Screenshots created on Mac/Windows added.
With the 1.3 relase of JavaFX there has been introduced a new default font: Amble Condensed.
The default font in 1.2 has been Dialog 12pt.
But that decision has some disadvantages – at least on Linux…. But one screen shot tells more than a thousand words:

You can easily spot the difference…
When using Dialog a font size of 9 can easily be used. Maybe 8 if really necessary… The smallest usable size with Amble seems to be 12 (that is the default) – maybe, if really necessary 11…
But even the default size of 12 is very problematic. I didn’t want to read long texts drawn in Amble 12…
Windows Screenshot can be found down there…
Is there anybody that could run those tests on Windows and post a screen shot?
Code for my demo:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 | import javafx.stage.Stage; import javafx.scene.Scene; import javafx.scene.text.Text; import javafx.scene.text.Font; import javafx.scene.layout.VBox; import javafx.scene.layout.HBox; import javafx.scene.paint.Color; import javafx.scene.layout.Stack; import javafx.scene.shape.Rectangle; import javafx.scene.Node; def colors = [ Color.BLACK, Color.WHITE ]; Stage { title: "Application title" scene: Scene { width: 800 height: 600 content: [ VBox { var stack:Stack; content: [ for ( color in colors ) { stack = Stack { content: [ Rectangle{ width: bind stack.width height: bind stack.height fill:color } HBox { content: [ for ( font in [ Font.DEFAULT.name, "Dialog" ] ) { VBox { content: [ for ( size in [ 6..20 ] ) { Text { fill: colors[(indexof color +1) mod colors.size()] font: Font { size: size name: font } content: "{font} with size { size }" } } ] } } ] } ] } } ] } ] } } println( "Default font: {Font.DEFAULT}" ); |
UPDATE:
John Tonkin send be a screen shot made using Windows:
It doesn’t look any better…
And here is a shot created on a Mac by Antoine Mischler. Does it look different?

Conclusion
The screenshots created on Linux and Windows look nearly the same (for “Amble Condensed”). The one created on the Mac looks a little bit better (look at 11pt)…
But be careful! The bounds are a different on Mac than on Windows/Linux (e.g. at 16pt)…


The skin returns a Rectangle {widht:70 height:150}. The layoutBounds are not affected in any way. But the boundsInLocal are bound to the bounds of the node.