JDK-8123924 : Canvas: error rendering text using GraphicsContext.strokeText
  • Type: Bug
  • Component: javafx
  • Sub-Component: graphics
  • Affected Version: 8
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • Submitted: 2013-07-10
  • Updated: 2015-06-17
  • Resolved: 2013-08-12
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8
8Resolved
Related Reports
Duplicate :  
Relates :  
Relates :  
Description
run application attached: there is canvas with text in it.
result: see screenshot
Comments
Verified on 8.0b104
26-08-2013

Only happens when running with a 64 bits machine.
12-08-2013

Affected tests: graphics/api/font/FontPostureTest2Test.java graphics/api/node/Clip_bTest.java graphics/api/node/TText1Test.java graphics/api/text/ContentTest.java graphics/api/text/EffectsTest.java graphics/api/text/SizeTest.java graphics/api/text/XyTest.java graphics/api/text/NameTest.java graphics/api/text/Textalignment_aTest.java graphics/api/node/TransparentMousePack_6bTest.java
12-08-2013

Joe, could you please try this on your Windows machine ? Thanks.
29-07-2013

Victor, similarly to RT-31572, this works on my machine. could you please try this again (with my modified program) and maybe paste the output of -Dprism.debug=true here ? Thanks
29-07-2013

Works for me on Mac and Windows The only differences is that on Mac, the text stroke is a bit wider (note we are not using the same font on mac and win) and it is clipped half across the last character. Also note the way you code the testcase (probably due to the sequence of commands you used to compose the scene) won't start on mac. I reorder the code to: @Override public void start(Stage primaryStage) throws Exception { final Canvas canvas = new Canvas(120, 120); GraphicsContext _gc = canvas.getGraphicsContext2D(); // _gc.setLineWidth(1); _gc.setFont(new Font(30)); // _gc.setTextAlign(TextAlignment.CENTER); _gc.strokeText("Text2", 50, 60); Pane borderPane = new VBox(canvas); borderPane.setPrefSize(180, 190); borderPane.setStyle("-fx-border-color: darkgray;"); Group root = new Group(borderPane); primaryStage.setScene(new Scene(root, 300, 300)); primaryStage.show(); }
17-07-2013

Affected tests: SceneGraphAutomated/test/scenegraph/functional/CanvasShape2Test/Text_STROKE_GRAD SceneGraphAutomated/test/scenegraph/functional/CanvasShape2Test/Text_FILL SceneGraphAutomated/test/scenegraph/functional/CanvasShape2Test/Text_LINEAR_GRAD SceneGraphAutomated/test/scenegraph/functional/CanvasShape2Test/Text_RADIAL_GRADIENT SceneGraphAutomated/test/scenegraph/functional/CanvasShape2Test/Text_STROKE SceneGraphAutomated/test/scenegraph/functional/CanvasShape2Test/Text_TRANSPARENT
11-07-2013