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

Stroke is not applied properly to complex Unicode characters.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • None
    • 7u10
    • javafx

      Stroke is not applied properly to complex Unicode characters.
      Please check the attached example; notice where the orange stroke is painted on the second character.

      package texttest;

      import javafx.application.Application;
      import javafx.scene.Scene;
      import javafx.scene.layout.VBox;
      import javafx.scene.paint.Color;
      import javafx.scene.text.Text;
      import javafx.stage.Stage;

      public class TextTest extends Application {

          public static void main(String[] args) {
              launch(args);
          }

          @Override public void start(Stage stage) {
              System.out.println(com.sun.javafx.runtime.VersionInfo.getRuntimeVersion());
              
              Text t0 = new Text("\ud800\udf02");
              Text t1 = new Text("\ud800\udf02");
              t1.setStroke(Color.DARKORANGE);
              
              VBox g = new VBox();
              g.getChildren().addAll(t0, t1);
              Scene s = new Scene(g);
              
              stage.setScene(s);
              stage.sizeToScene();
              stage.show();
          }
      }

            yaow Yao Wang (Inactive)
            ilatyshe Irina Grineva (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: