RFR: 8263140: Japanese chars garble in console window in HSDB [v2]
Yasumasa Suenaga
ysuenaga at openjdk.java.net
Tue Mar 9 00:58:07 UTC 2021
On Mon, 8 Mar 2021 20:21:06 GMT, Chris Plummer <cjplummer at openjdk.org> wrote:
>>> There are two additional locations that use `lookupFont("Courier")`. Any reason not to replace them also? If you do replace them, then I think you can get rid of `lookupFont`.
>>
>> I think you really, really should get rid that ! Courier is a Postscript font that you will be hard pressed to find on modern systems. On Windows we might still have the "special case" code that remaps it to Courier New. Linux probably doesn't have it because it is a proprietary name which is why JDK used it only in 1.0 and stopped in 1.1 some 25 (!) years ago. And using a logical font you will get much better code point support
>>
>> And if we don't have special logic then Courier will map to "Dialog" which is quite a different beast - and so probably not at all what the coder wanted.
>
> BTW, on linux this does slightly adjust the appearance of text in the console. Not saying it's better or worse, just different.
>
> Before:
> 
>
> After:
> 
Thank you for the comments!
> Any reason not to replace them also?
AnnotateMemoryPanel and MemoryPanel will not be non-ascii chars because they will show the address and kind of memory, so I didn't change them.
But I understood that we should not use Courier font, so I pushed new commit to get rid of it. Could you review again?
-------------
PR: https://git.openjdk.java.net/jdk/pull/2862
More information about the serviceability-dev
mailing list