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

When custom font is loaded, setFont is ignored

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Not an Issue
    • Affects Version/s: 8
    • Fix Version/s: 8
    • Component/s: javafx
    • Environment:

      8.0b83

      Description

      Run the code from an attached project.

      There are 2 interesting places:

      first:
              //You can comment out these lines.
              Font.loadFont(JavaApplication8.class.getResourceAsStream("arialw7.ttf"), 40);
              String cssFontUrl = JavaApplication8.class.getResource("custom_font.css").toExternalForm();
              scene.getStylesheets().add(cssFontUrl);
              
      second:
              b.setFont(new Font(20));

      When I have the first, the second doesn't affect.
      comment out the first, the second will start working.

        Attachments

          Activity

            People

            • Assignee:
              dgrieve David Grieve
              Reporter:
              akirov Alexander Kirov (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Due:
                Created:
                Updated:
                Resolved:
                Imported: