Times has been the hard coded name for Serif in the JDK sources for macOS since the port was contributed by Apple. But it seems that macOS Monterey doesn't have this font. And the hard-coded fallback is also Times ! So we end up returning Dialog which is very bad.
The safest fix here is to make Times New Roman the fall back, so that on older macOS versions there is absolutely no change. Only on Monterey and presumably later, will it use Times New Roman which, I suspect, is what Times actually ends up being anyway. Also to prevent unconditional warnings being printed I needed to change those to be conditional on logging being set. ------------- Commit messages: - 8273358: macOS Monterey does not have the font Times needed by Serif Changes: https://git.openjdk.java.net/jdk/pull/5420/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5420&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8273358 Stats: 65 lines in 2 files changed: 62 ins; 0 del; 3 mod Patch: https://git.openjdk.java.net/jdk/pull/5420.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5420/head:pull/5420 PR: https://git.openjdk.java.net/jdk/pull/5420
