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

Unable to choose semibold fonts using CSS font-weight

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 8
    • javafx

      Having loaded a regular, a bold, and a semibold font, I am able to style my application with both regular and bold fonts by setting the font family and weight. However, choosing the semibold font is not possible, unless I use the work-around of setting the font-family to a name containing "semibold". I am using the Apache licensed Open Sans (downloadable from fontsquirrel.com) and by using the following CSS work-around it works

      -fx-font-family: "Open Sans Semibold";

      But if I use a font family of Open Sans and set a font weight, there is no way of getting the semibold font. I have tried font weights "bold", "semibold" (not allowed according to docs), 100, 200, ..., 900, and no matter what I do, the semibold font does not show up. I would expect that at least one of the numbered font weights would pick up the semibold font I loaded, but it does not.

            Unassigned Unassigned
            risaksen Randahl Isaksen
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Imported: