-
Enhancement
-
Resolution: Unresolved
-
P4
-
9
JDK provides several logical fonts but these have become very
static and difficult to update.
Some apps want to know the desktop font and have resorted
to code like this :
WindowsLookAndFeel laf = new WindowsLookAndFeel();
Font f = (Font)laf.getDefaults().get("Label.font");
which will not be accessible in JDK 9 due to encapsulation.
We could add an API that returns not a logical font as such
but a named physical font that is the font used by the current
desktop environment.
Desktops use multiple fonts so it should be the font that
is "typically" used, if not universally.
static and difficult to update.
Some apps want to know the desktop font and have resorted
to code like this :
WindowsLookAndFeel laf = new WindowsLookAndFeel();
Font f = (Font)laf.getDefaults().get("Label.font");
which will not be accessible in JDK 9 due to encapsulation.
We could add an API that returns not a logical font as such
but a named physical font that is the font used by the current
desktop environment.
Desktops use multiple fonts so it should be the font that
is "typically" used, if not universally.