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

Italic font is not rendered

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P4
    • None
    • 8u60
    • javafx
    • x86_64
    • windows_7

    Description

      Run this sample program :

      "
      import javafx.application.Application;
      import static javafx.application.Application.launch;
      import javafx.scene.Scene;
      import javafx.scene.control.Label;
      import javafx.scene.layout.VBox;
      import javafx.stage.Stage;

      public class FontIssue extends Application {

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

          @Override
          public void start(Stage stage) {

              Label label = new Label("this is a test");
              label.setStyle("-fx-font-family: Arial;");

              Label label2 = new Label("this is a test");
              label2.setStyle("-fx-font-family: Arial; -fx-font-style:italic;");

              Label label3 = new Label("this is a test");
              label3.setStyle("-fx-font-family: Algerian;");

              Label label4 = new Label("this is a test");
              label4.setStyle("-fx-font-family: Algerian; -fx-font-style:italic;");

              VBox box = new VBox();
              box.getChildren().addAll(label, label2, label3, label4);
              Scene scene = new Scene(box);
              stage.setScene(scene);
              stage.show();
          }
      }
      "

      As you can see, the Algerian font is not rendered in Italic. I've checked inside my Windows font and I don't have the Italic font.

      Now Excel and my navigator are rendering this font properly in Italic so they are synthesizing them somehow and I understood that JavaFX could do the same.

       

      Attachments

        Issue Links

          Activity

            People

              prr Philip Race
              shadzic Samir Hadzic
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: