[OpenJDK 2D-Dev] RFR 8199789: Emit a warning message when t2k is selected via system property
Prahalad Kumar Narayanan
prahalad.kumar.narayanan at oracle.com
Tue Mar 20 09:30:01 UTC 2018
Good day to you.
I imported your patch and checked the resulting build.
Warnings showed up as expected with use of "t2k" or "legacy" in the VM option -Dsun.java2d.font.scaler.
However, I'm unable to interpret this line and its intended outcome.
> It also adds a new value for sun.java2d.font.scaler of "legacy" which means "t2k" but as it was used in by default.
In my observation with logs, setting VM option to
"t2k" instantiates T2KFontScaler and
"legacy" instantiates FreetypeFontScaler.
If this is the intended behavior, the code changes work as expected.
Have a good day
From: Phil Race
Sent: Tuesday, March 20, 2018 1:09 AM
Subject: [OpenJDK 2D-Dev] RFR 8199789: Emit a warning message when t2k is selected via system property
Webrev : http://cr.openjdk.java.net/~prr/8199789/
https://bugs.openjdk.java.net/browse/JDK-8193017 made freetype the default font rasteriser for all JDK builds.
We plan to remove t2k completely including references to it from open sources, before JDK 11 GA's
But for now it is still there for debugging but to make it clear this small fix makes a warning get printed if you try to use it.
It also adds a new value for sun.java2d.font.scaler of "legacy" which means "t2k" but as it was used in by default.
The subtle issue is that "t2k" disables using GDI for LCD text.
"legacy" gets you exactly what JDK did by default in 6u10 -> JDK 10 inclusive.
So it may be more useful for a debugging comparison flag.
More information about the 2d-dev