including fonts

Tom Eugelink tbee at
Sun Jan 3 10:21:44 UTC 2016

I'm currently including Google's Roboto font in JFXtras and making it easily available to other users. I noticed that the font-family attribute in font-face is ignored, and you have to use the name as it is specified in the TTF file. I found which says "/Please note that all @font‑face descriptors are ignored except for the src descriptor./" That pretty much explains what is going on.

Now, Roboto comes in different styles, condensed, bold, etc, but also italic. However, italic is a separate TTF file, so you have a Roboto-Medium.ttf and a Roboto-MediumItalic.ttf. The name of the font inside these two TTF files is the same, so when I use "font-family: 'Roboto Medium'" whatever ever font is defined last by font-face is used, and the other is not accessible.

My question is: is the way Roboto does Italic, with the same font name in the TTF file, a bug of Roboto, or is this common?


More information about the openjfx-dev mailing list