Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8190404

Wrong glyph spacing

XMLWordPrintable

    • x86_64
    • linux_ubuntu

      FULL PRODUCT VERSION :
      Java(TM) SE Runtime Environment (build 9+181)
      Java HotSpot(TM) 64-Bit Server VM (build 9+181, mixed mode)


      ADDITIONAL OS VERSION INFORMATION :
      Linux 4.10.0-35-generic #39-Ubuntu SMP Wed Sep 13 07:46:59 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux


      EXTRA RELEVANT SYSTEM CONFIGURATION :
      NVIDIA GeForce GTX 660 GPU.

      A DESCRIPTION OF THE PROBLEM :
      Glyphs in Text nodes are rendered with wrong spacing.



      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      - Run the attached sample.
      - Click on the MultiNode button to see the text layout with multiple nodes.
      - Click on the SingleNode button to see the text layout with one node.


      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      The rendered text should be identical in both cases.
      ACTUAL -
      The rendered text are not identical in both cases.

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      public class GlyphSpacing extends Application
      {
          public void start(final Stage primaryStage) throws Exception
          {
              Button singleNode = new Button("SingleNode");
              Button multiNode = new Button("MultiNode");
              TextFlow textFlow = new TextFlow(new Text(" .GlyphSpacing"));
              VBox root = new VBox(new HBox(singleNode, multiNode), textFlow);

              singleNode.setOnAction(e ->
              {
                  textFlow.getChildren().clear();
                  textFlow.getChildren().add(new Text(" .GlyphSpacing"));
              });

              multiNode.setOnAction(e ->
              {
                  textFlow.getChildren().clear();
                  textFlow.getChildren()
                          .addAll(new Text(" ."), new Text("GlyphSpacing"));
              });

              Scene scene = new Scene(root, 200, 200);

              primaryStage.setScene(scene);
              primaryStage.show();
          }
      }
      ---------- END SOURCE ----------

            prr Philip Race
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: