RFR: 8352890: Remove unnecessary Windows version check in FileFontStrike

Sergey Bylokhov serb at openjdk.org
Wed Mar 26 08:39:10 UTC 2025


On Tue, 25 Mar 2025 14:21:10 GMT, Daniel Gredler <dgredler at openjdk.org> wrote:

> FileFontStrike contains a check as to whether the current Windows version is Windows XP or later. The current minimum supported version is Windows 10, so this is no longer needed.
> 
> When the code in question was added 17 years ago, a test was included (test/jdk/java/awt/Graphics2D/DrawString/ScaledLCDTextMetrics.java), so this can be used to verify that there are no regressions.

src/java.desktop/windows/native/libfontmanager/lcdglyph.c line 126:

> 124: 
> 125: JNIEXPORT void JNICALL Java_sun_font_FileFontStrike_initNative(JNIEnv *env, jclass unused) {
> 126:     memset(igLUTable, 0, sizeof igLUTable);

This line was updated in https://github.com/openjdk/jdk/pull/9772 but I wonder if we actually need it? can we initialize it in the code above with = {0}?
BTW what is the default content of this global static array - zeros? I still prefer {0} for readability even if default is zero.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/24230#discussion_r2013624736


More information about the client-libs-dev mailing list