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

css -fx-font-weight does not accept all documented values

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 8
    • fx2.0
    • javafx
    • JavaFX 2.0GA JDK7u2b8 Win7-32bit

      The JavaFX 2.0 css reference allows for numeric values for -fx-font-weight:
        The font's weight, using the following syntax:
        [ normal | bold | bolder | lighter | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 ]
      (the above from: http://download.oracle.com/javafx/2.0/api/javafx/scene/doc-files/cssref.html#typefont)

      Numeric values will cause css parse exceptions.
      Bolder and lighter don't generate exceptions, but they do anything either (but that might just be the fonts I tried).
      It seems that bolder should generate a bold font if a bold font is available (which is what html css seems to do - http://www.w3schools.com/cssref/playit.asp?filename=playcss_font-weight&preval=bolder)

        1. FontWeightTest.java
          0.9 kB
        2. FontWeightTest.java
          0.7 kB
        3. fxfontwidth.png
          fxfontwidth.png
          11 kB

            dgrieve David Grieve
            josmithjfx John Smith (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: