Hi, After further investigation, I think there's a bug that font-family is not working (defining a font family name).
Because regardless of the font-family I use, the font name within the font is used. It's openjfx 17.0.2 -- Thiago. Em sex., 20 de mai. de 2022 às 18:06, Thiago Milczarek Sayão < thiago.sa...@gmail.com> escreveu: > Hi, > > I want to have one font that is "regular" and a variation of the same font > as "bold", used when specified "-fx-font-weight: bold". > > @font-face { > font-family: 'Gotham Condensed'; > src: url('../fonts/GothamCondensed-Book.otf'); > } > > @font-face { > font-family: 'Gotham Condensed Bold'; > src: url('../fonts/GothamCondensed-Bold.otf'); > } > > > .text { > -fx-font-family: 'Gotham Condensed'; > } > > I have searched online and there are many variations such as: > > - @font-face "font-family" is ignored and you have to use the real font > name; > - If you use 'Bold' as a suffix, javafx will use it as bold; > - you have to specify "font-weight: bold" on the @font-face > > The last one is what seems that the CSS specs says, but does not seem to > work. > > Is it possible? > > Thanks. > >