This seems like a bug. Certainly overriding Region#getUserAgentStylesheet() is 
the preferred way of customizing styles for a control.  Maybe the styles from 
the Region UA stylesheet aren’t being considered when doing a font lookup. That 
would for sure be a bug.

But there are a lot of moving parts.

Are there other stylesheets that might take precedence? Are there other styles 
in the custom stylesheet that are/are not working? Do you have a short example 
that reproduces the issue?

Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10

________________________________
From: openjfx-dev <openjfx-dev-boun...@openjdk.java.net> on behalf of Dirk 
Lemmermann <dlemmerm...@gmail.com>
Sent: Friday, October 4, 2019 5:59:17 AM
To: openjfx-dev@openjdk.java.net Mailing <openjfx-dev@openjdk.java.net>
Subject: Custom Fonts in User Agent Stylesheets

I noticed today that the custom fonts I defined in a user agent stylesheet of a 
custom control are not being used. It only started working when I “manually” 
added the stylesheet to the control via getStylesheets().add() instead of 
overriding getUserAgentStylesheet().

Does anyone know if this is intentional or a bug? Are there certain things that 
JavaFX does not support depending on the “type” of stylesheet?

Dirk

Reply via email to