RFR: 8240756: [macos] SwingSet2:TableDemo:Printed Japanese characters were garbled

Toshio Nakamura tnakamura at openjdk.java.net
Thu Mar 10 09:46:39 UTC 2022


On Fri, 23 Apr 2021 06:49:10 GMT, Sergey Bylokhov <serb at openjdk.org> wrote:

>> Hi,
>> 
>> Could you review the fix?
>> When non-English characters were printed from JTable on MacOS, CTextPipe.doDrawGlyphs was called by OSXSurfaceData.drawGlyphs. However, CTextPipe seems not support glyph with slot number of composite fonts.
>> 
>> The slot data mask of GlyphVector is 0xff000000. In my environment, Japanese font was loaded at slot 4, and glyph data is like [0x40003e5]. Then, unexpected glyph was drawn.
>
> As far as I understand it is not directly related to the JTable and the bug is reproduced if some specific font is used when any text is printed? Did you check why the CTextPipe does not support it directly? It looks like the JavaCT_DrawGlyphVector uses pure core graphics, which I think should support this font?

@mrserb  Thank you for the review.

@mrserb @prrace Could you sponsor this fix?

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

PR: https://git.openjdk.java.net/jdk/pull/3619



More information about the client-libs-dev mailing list