Details
-
Bug
-
Resolution: Fixed
-
P3
-
8u60, 9
-
x86_64
-
windows_7
Backports
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8132024 | 8u66 | Anton Tarasov | P3 | Resolved | Fixed |
Description
FULL PRODUCT VERSION :
java version "1.8.0_60-ea"
Java(TM) SE Runtime Environment (build 1.8.0_60-ea-b21)
Java HotSpot(TM) Client VM (build 25.60-b21, mixed mode, sharing)
A DESCRIPTION OF THE PROBLEM :
Fonts included via @font-face in woff format are no longer recognized by the WebView control. OTF Fonts are recognized, though. This is a regression as it works in Java 8u45.
REGRESSION. Last worked in version 8u45
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Install the html code and woff file from below on an WebServer
2. Run the java class below with Java8 u45.
-> The second headline will be rendered with the DinPro Font
3. Run the same class with Java8 u60
-> The second headline will be rendered with the Default Font
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
WebViewSample.java:
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.web.WebView;
import javafx.stage.Stage;
public class WebViewSample extends Application {
@Override public void start(Stage stage) {
// create the scene
stage.setTitle("Web View");
WebView webView = new WebView();
Scene scene = new Scene(webView,750,500);
webView.getEngine().load("http://localhost/FontTest.html");
stage.setScene(scene);
stage.show();
}
public static void main(String[] args){
launch(args);
}
}
FontTest.html:
<!DOCTYPE HTML>
<html>
<head>
<title>Web Font</title>
<style>
@font-face {
font-family: "WOFF-DIN-Regular";
src: url(/DINWebPro.woff) format("woff");
}
</style>
</head>
<body>
<h1>This is a H1 heading styled with default Font</h1>
<h1 style="font-family: 'WOFF-DIN-Regular';" >This is a H1 heading styled with WOFF-DIN-Regular</h1>
</body>
</html>
DINWebPro.woff is available at:
http://easyprint.com/_global/fonts/DINWebPro.woff
---------- END SOURCE ----------
java version "1.8.0_60-ea"
Java(TM) SE Runtime Environment (build 1.8.0_60-ea-b21)
Java HotSpot(TM) Client VM (build 25.60-b21, mixed mode, sharing)
A DESCRIPTION OF THE PROBLEM :
Fonts included via @font-face in woff format are no longer recognized by the WebView control. OTF Fonts are recognized, though. This is a regression as it works in Java 8u45.
REGRESSION. Last worked in version 8u45
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Install the html code and woff file from below on an WebServer
2. Run the java class below with Java8 u45.
-> The second headline will be rendered with the DinPro Font
3. Run the same class with Java8 u60
-> The second headline will be rendered with the Default Font
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
WebViewSample.java:
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.web.WebView;
import javafx.stage.Stage;
public class WebViewSample extends Application {
@Override public void start(Stage stage) {
// create the scene
stage.setTitle("Web View");
WebView webView = new WebView();
Scene scene = new Scene(webView,750,500);
webView.getEngine().load("http://localhost/FontTest.html");
stage.setScene(scene);
stage.show();
}
public static void main(String[] args){
launch(args);
}
}
FontTest.html:
<!DOCTYPE HTML>
<html>
<head>
<title>Web Font</title>
<style>
@font-face {
font-family: "WOFF-DIN-Regular";
src: url(/DINWebPro.woff) format("woff");
}
</style>
</head>
<body>
<h1>This is a H1 heading styled with default Font</h1>
<h1 style="font-family: 'WOFF-DIN-Regular';" >This is a H1 heading styled with WOFF-DIN-Regular</h1>
</body>
</html>
DINWebPro.woff is available at:
http://easyprint.com/_global/fonts/DINWebPro.woff
---------- END SOURCE ----------
Attachments
Issue Links
- backported by
-
JDK-8132024 WebView does not render woff fonts
-
- Resolved
-
- duplicates
-
JDK-8134548 webview CSS processor can't handle WOFF font files
-
- Closed
-
- relates to
-
JDK-8133142 [MacOS] Rendering on wsj.com is broken
-
- Closed
-