On Wed, 12 Feb 2025 05:07:08 GMT, Phil Race <p...@openjdk.org> wrote:
>> Please review the change that looks up `FT_Property_Set` from the current >> executable first when running on static JDK. If `FT_Property_Set` can be >> found, don't `dlopen` `libfreetype.so`. If a bundled `libfreetype` is >> statically linked with the launcher executable (on static JDK), >> `FT_Property_Set` is provided in the current executable. >> >> According to the existing comment in `setInterpreterVersion`, `libfreetype` >> is always bundled on Windows & Mac. This change only applies to Linux. >> >> I tested the change by stepping through the code using >> `test/jdk/java/awt/font/JNICheck/FreeTypeScalerJNICheck.java`. > > src/java.desktop/share/native/libfontmanager/freetypeScaler.c line 303: > >> 301: #else >> 302: >> 303: if (JVM_IsStaticallyLinked()) { > > These kinds of checks on behalf of a statically linked build are quite > intrusive. > Perhaps there is no alternative, but still. > SFAIK, at this time, no one is under any obligation to test this works, or to > know how not to break it. > So I will approve with those caveats. Thanks for the review, @prrace! ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/23574#discussion_r1953012595