Font metrics in JavaFX Canvas
bourges.laurent at gmail.com
Wed Dec 6 08:34:59 UTC 2017
If I can help (dev / test / build / patch), I would love doing it on this
RFE... on my spare time as usual (best effort).
However I have no idea how text metrics are implemented in JavaFX.
Could anyone give us directions or draft ideas to do the job ourselves ?
Should we start a github repository to fix that issue with all interested
Le 5 déc. 2017 13:54, "David Gilbert" <dave at jfree.org> a écrit :
> Any feedback on this item?
> Best regards,
> David Gilbert
> > On 30 Nov 2017, at 08:26, David Gilbert <dave at jfree.org> wrote:
> > Hello,
> > 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:
> > http://www.jfree.org/jfreechart/fxgraphics2d-font-issue.png
> > 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 <
> > Best regards,
> > David Gilbert
> >  https://github.com/jfree/fxgraphics2d <https://github.com/jfree/
> >  https://github.com/jfree/jfreechart-fx <https://github.com/jfree/
> >  https://github.com/jfree/orson-charts-fx <https://github.com/jfree/
More information about the openjfx-dev