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

Can't set font with setFont when font is defined in stylesheet

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Not an Issue
    • Affects Version/s: 8u66
    • Fix Version/s: None
    • Component/s: javafx
    • Labels:
    • Subcomponent:
    • Introduced In Build:
      b08
    • Introduced In Version:

      Description

      Reproducible: always
      Platform-dependent: no
      Regression: yes
      Introduced: 8u20b08
      Workaround exists: yes

      Steps to reproduce (run attached sample):
      1. Create stylesheet, define font for ".root" there and assign it to a scene.
      2. Try to change font of a text component (e.g. TextArea) with setFont.
      Expected behavior: font is changed successfully.
      Actual behavior: font is changed and switched back to a font from stylesheet.

      Workaround: apply font with setStyle("-fx-font-...");

        Attachments

          Activity

            People

            • Assignee:
              kcr Kevin Rushforth
              Reporter:
              arusakov Andrey Rusakov (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: