kirill-grouchnikov / substance

A modern and high-performant Swing look-and-feel library
164 stars 109 forks source link

How to apply custom FontSets? #81

Closed utybo closed 6 years ago

utybo commented 6 years ago

Is there a way to apply a custom font set to a theme? I wish to force a specific font in my app to have consistancy across all OSes. Is this currently possible? I have searched but I'm a little confused...

kirill-grouchnikov commented 6 years ago

Font sets are orthogonal to themes. The font policy passed to SubstanceCortex.GlobalScope.setFontPolicy will apply to all the UI elements in all the windows. You should call that method before creating your first window.

utybo commented 6 years ago

OK, thank you!