RFR: 8330559: Trailing space not rendering correctly in TextFlow in RTL mode [v2]

Andy Goryachev angorya at openjdk.org
Thu Jun 6 15:08:53 UTC 2024


On Thu, 6 Jun 2024 14:15:09 GMT, Karthik P K <kpk at openjdk.org> wrote:

>> The issue is specific to Mac. The glyph positions returned from native side for complex text is not handled in the text render logic. This issue is observed only when trailing spaces are present along with LTR text mixed with RTL text (Example: "Arabic: العربية").
>> 
>> Made changes in `getPosX` of `TextRun` class to handle negative values.
>> 
>> Tested the changes manually with the sample code present in the bug and using the MonkeyTester.
>
> Karthik P K has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Fixing the issue in CTGlyphLayout class

modules/javafx.graphics/src/main/java/com/sun/javafx/font/coretext/CTGlyphLayout.java line 159:

> 157:             }
> 158:             /* JDK-8330559 - Mac specific issue.
> 159:              * When traling spces are present in the text containing LTR and RTL

spelling: "trailing spaces"

modules/javafx.graphics/src/main/java/com/sun/javafx/font/coretext/CTGlyphLayout.java line 161:

> 159:              * When traling spces are present in the text containing LTR and RTL
> 160:              * text together, negative position values are returned for spaces from
> 161:              * the native side. Since TextRun expects positive value relative to the

should we limit the scope of the change to mac only (PlatformUtil.isMac()?) since CTGlyphLayout is common code?

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

PR Review Comment: https://git.openjdk.org/jfx/pull/1468#discussion_r1629708148
PR Review Comment: https://git.openjdk.org/jfx/pull/1468#discussion_r1629711705


More information about the openjfx-dev mailing list