Are there any plans to add native SVG support?

Adam Siembida adam at adamsiembida.com
Sat Jul 17 19:05:42 UTC 2021


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