WebView - some minor rendering bugs?
Thomas Schroeter
tschroeter at xmail.net
Thu May 2 02:35:10 PDT 2013
Hallo JavaFX Developers,I check out the WebView capabilities and ask myself whether the rendering should behaveexactly like the native WebKit Rendering ? I think the rendering is customized !? For examplethe font smoothing for Webpages using the Font "Helvetica Neue" will not displayed correctly.Also there are some minor css rendering problems (border, position) Or there are some hiddenvmargs to adjust font smoothing ?best Regards,ThomasMy System:OSX Mountain Lion 10.8.2JDK 1.7.0_21JavaFX 2.2.21Example Webpage using Helvetica Neuehttp://stevecochrane.com/v3/2007/12/13/helvetica-neue-variants-for-use-on-the-web/Verbose Output:Prism pipeline init order: es2 j2d Using t2k for text rasterizationUsing dirty region optimizationsPrism pipeline name = com.sun.prism.es2.ES2PipelineLoading ES2 native library ... prism-es2 succeeded.GLFactory using com.sun.prism.es2.MacGLFactory(X) Got class = class com.sun.prism.es2.ES2PipelineInitialized prism pipeline: com.sun.prism.es2.ES2PipelineGraphics Vendor: ATI Technologies Inc. Renderer: AMD Radeon HD 6490M OpenGL Engine Version: 2.1 ATI-1.0.29WebViewMain.javaimport java.io.File;import javafx.application.Application;import javafx.scene.Scene;import javafx.scene.layout.StackPane;import javafx.scene.web.WebEngine;import javafx.scene.web.WebView;import javafx.stage.Stage;import fad.util.ClassPathModifier;public class WebViewMain extends Application {public static void main(String[] args) {String fxStr = "/Library/Java/JavaVirtualMachines/jdk1.7.0_21.jdk/Contents/Home/jre/lib/jfxrt.jar";try { ClassPathModifier.addFile(new File(fxStr));} catch (Exception ex) { ex.printStackTrace();}Application.launch(args);}@Overridepublic void start(Stage primaryStage) throws Exception {primaryStage.setTitle("WebView test");WebView browser = new WebView();WebEngine engine = browser.getEngine();String url = "http://stevecochrane.com/v3/2007/12/13/helvetica-neue-variants-for-use-on-the-web/";engine.load(url);StackPane sp = new StackPane();sp.getChildren().add(browser);Scene root = new Scene(sp);primaryStage.setScene(root);primaryStage.show();}}
------------------------------------------------------------------------------------
More information about the openjfx-dev
mailing list