JavaFX Webview letter-spacing Bug?

612 views Asked by At

Currently I am using the JavaFx Webview to load a HTML page. But there is a problem when it loads the HTML page. It doesn't read the letter-spacing or -webkit-letter-spacing attribute in CSS. It's fine with the Chrome browser. How can I make it work in JavaFx?

<!doctype html>
<html>
    <head>
        <meta charset="utf-8"/>
        <title>test</title>
        <style>
            .text {
                letter-spacing: 20px;
            }
        </style>
    </head>
    <body>
        <div class="text">
            abcdefg
        </div>
    </body>
</html>
1

There are 1 answers

1
Andrey Chaschev On BEST ANSWER

Looks like this property is not supported in JavaFX/JDK 7, but works for me in JavaFX/JDK 8. As far as I know, some of the WebViews rendering bugs fixed in JDK 8 won't be backported to JDK 7 and this one seems like being one of such bugs.

enter image description here

enter image description here

enter image description here