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

When custom font is loaded, setFont is ignored

XMLWordPrintable

      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.

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

              Created:
              Updated:
              Resolved:
              Imported: