On Thu, 6 Jan 2022 02:49:17 GMT, Toshio Nakamura <[email protected]> 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.
>
> Toshio Nakamura has updated the pull request with a new target base due to a
> merge or a rebase. The incremental webrev excludes the unrelated changes
> brought in by the merge/rebase. The pull request contains ten additional
> commits since the last revision:
>
> - Revised according to review comments
> - Merge branch 'master' into 8240756
> - 8240756: [macos] SwingSet2:TableDemo:Printed Japanese characters were
> garbled
> - revert previous proposal
> - Merge branch 'master' into 8240756
> - 2nd proposal
> - Revert previous change
> - Merge branch 'master' into 8240756
> merge master
> - 8240756: [macos] SwingSet2:TableDemo:Printed Japanese characters were
> garbled
src/java.desktop/macosx/classes/sun/lwawt/macosx/CTextPipe.java line 107:
> 105:
> 106: private GlyphVector getGlyphVectorWithRange(final Font font, final
> GlyphVector gV, int start, int count) {
> 107: final int length = gV.getNumGlyphs();
length is not needed?
src/java.desktop/macosx/classes/sun/lwawt/macosx/CTextPipe.java line 156:
> 154: int slot = (gV.getGlyphCode(start) &
> 155: CompositeGlyphMapper.SLOTMASK) >> 24;
> 156: sg2d.setFont(getSlotFont(gV.getFont(), slot));
Do we need to change the font for each glyph or we should do that only if the
slot was changed? Or it is a common situation that each glyph will have its own
slot?
-------------
PR: https://git.openjdk.java.net/jdk/pull/3619