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

Font loaded via Font.loadFont is not rendered

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Duplicate
    • Affects Version/s: fx2.1
    • Fix Version/s: fx2.1
    • Component/s: javafx
    • Labels:
    • Environment:

      javafx-sdk2.1.0-beta-b09, Windows 7 x64

      Description

      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.

        Attachments

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

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported: