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

Font loaded via Font.loadFont is not rendered

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • fx2.1
    • fx2.1
    • javafx
    • javafx-sdk2.1.0-beta-b09, Windows 7 x64

      I load font using: Font font = Font.loadFont("file:///D:/JavaFX/temp/OpenSans-Regular.ttf", 0);

      which is: font = Font[name=Open Sans, family=Open Sans, style=Regular, size=12.0]

      It is not rendered when set with any of the following methods:

      1) set via setFont as following: label.setFont(font);
      2) set via css file: scene.getStylesheets().add("Bug.css");
      3) set using setStyle: label.setStyle("-fx-font-family: \"Open Sans\";");

      It doesn't show any text at all.

        1. OpenSans-Regular.ttf
          212 kB
        2. Bug.java
          1 kB
        3. Bug.css
          0.2 kB

            prr Philip Race
            mrkam Alexander Kuznetcov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: