On Thu, 9 Sep 2021 16:50:20 GMT, Prasanta Sadhukhan <[email protected]>
wrote:
>> 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.
>
> src/java.desktop/macosx/classes/sun/font/CFontManager.java line 228:
>
>> 226:
>> 227: setupLogicalFonts("Dialog", defaultFont, defaultFallback);
>> 228: setupLogicalFonts("Serif", "Times", "Times New Roman");
>
> Can we do it under macos >= Monterey check so that we are sure it's not
> affecting older releases just as we do for JTabbedPane legibility issue using
> JRSUIUtils.isMacOSBigSurOrAbove() check?
> I see we have both Times and Times New Roman in "Font Book"...BTW, did you
> try "Restore Standard fonts" option in Font Book to see if "Times" font
> somehow comes back?
Just to clarify, I see those 2 fonts in BigSur and Catalina..
-------------
PR: https://git.openjdk.java.net/jdk/pull/5420