Are there any plans to add native SVG support?
Nir Lisker
nlisker at gmail.com
Mon Jul 19 17:00:03 UTC 2021
There is even an older one: https://bugs.openjdk.java.net/browse/JDK-8091950
On Mon, Jul 19, 2021 at 7:53 PM Kevin Rushforth <kevin.rushforth at oracle.com>
wrote:
> JavaFX has some limited SVG support for geometry; see SVGPath [1].
> What's missing is support for SVG images. There is an open Enhancement
> request tracked as JDK-8267753 [2]. It would be a fair amount of work to
> implement this, and there is no current plan, but it would be a useful
> way to allow applications to specify resolution-independent images.
>
> -- Kevin
>
> [1]
>
> https://openjfx.io/javadoc/16/javafx.graphics/javafx/scene/shape/SVGPath.html
> [2] https://bugs.openjdk.java.net/browse/JDK-8267753
>
>
> On 7/17/2021 12:05 PM, Adam Siembida wrote:
> > With 4k monitors, retina displays, mobile devices, multi-monitor setups
> etc. becoming more popular, I've been finding that the lack of native SVG
> support is a practical omission from JavaFX. Just about any modern
> framework can support it, but in JavaFX you have to go about dissecting SVG
> files with a text editor and pulling out the path information, or do
> roundabout solutions like adding it to backgrounds through CSS, or messing
> around with font icons.
> >
> > This issues has been most glaring for me when trying to work with icons,
> like in toolbars, menus, and buttons. I recently found out about an
> (undocumented?) feature in JavaFX where you can make multiple image files
> with with special suffixes denoting screen densities (x2, x3, etc), which
> are automatically selected somehow. This has been a help in making my icons
> look better on my 4k monitor, but it would have been much easier, future
> proof, and less laborious to use simply use SVG files instead.
> >
> > My final issue with the lack of SVG support is a branding issue. For
> someone who has never used JavaFX before and are taking a look at it for
> the first time, the lack of SVG support might make JavaFX seem... old and
> outdated: "oh this framework is from before the days of vector graphics"
> (not saying it is old or outdated!).
> >
> > Does anyone know if native SVG support is something that is being
> considered for JavaFX? If not, does anyone else think that this is
> important feature that should be considered for adding to JavaFX?
> >
> > -Adam
>
>
More information about the openjfx-discuss
mailing list