Font metrics in JavaFX Canvas
dave at jfree.org
Tue Dec 5 12:54:09 UTC 2017
Any feedback on this item?
> On 30 Nov 2017, at 08:26, David Gilbert <dave at jfree.org> wrote:
> I have an open source project FXGraphics2D  that provides a Graphics2D API for the JavaFX canvas. It is open source and used to provide JavaFX support for JFreeChart  and Orson Charts . It can also be used more generally for any code that targets the Java2D API.
> One limitation that I’ve encountered is that there is no API to get font metrics for fonts rendered on the JavaFX canvas, so it is difficult to implement the method Graphics2D.getFontMetrics(Font f) accurately. As a result, text alignment is difficult, for example see the tick labels on the vertical axis in this chart:
> There is a feature request in the bug tracker, open for some time, that targets this particular feature. I’d like to highlight it for (hopefully) some attention in a future JDK release:
> https://bugs.openjdk.java.net/browse/JDK-8090775 <https://bugs.openjdk.java.net/browse/JDK-8090775>
> Best regards,
> David Gilbert
>  https://github.com/jfree/fxgraphics2d <https://github.com/jfree/fxgraphics2d>
>  https://github.com/jfree/jfreechart-fx <https://github.com/jfree/jfreechart-fx>
>  https://github.com/jfree/orson-charts-fx <https://github.com/jfree/orson-charts-fx>
More information about the openjfx-dev