Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8335273

[macos] irregular rendering of mixed text in RTL orientation

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 11, 17, 21
    • client-libs
    • macOS 14.5 on Mac Book Pro M1 silicon

    • 2d
    • os_x

      Run the attached program on macOS (first reproduced on M1 Pro 14.5).

      - slowly make the frame width larger by dragging the right edge of the window to the right

      observe the following failure modes:
      1. a space appears between "::" and "Arabic" on the first line
      2. when this happens, the cursor stops blinking (either stays on or disappears)
      3. when the Arabic word appears on the first line, the space between "::" and "Arabic" disappears (the text gets rendered correctly) but the part of the cursor's direction indicator sometimes remains on screen permanently

      (see the screenshots)

      This issue is similar to https://bugs.openjdk.org/browse/JDK-8330559 in JavaFX, or it might be caused by the same macOS bug.

      The phantom space seems to appears when the CTRunGetPositions native call populates the positions array with negative values.

      For reference, the text string is

      "Arabic:: " +
       "\u0627\u0644\u0639\u0631\u0628\u064a\u0629" +
      "\n" +
      "Hebrew: " +
      "\u05e2\u05d1\u05e8\u05d9\u05ea"

      Apple API https://developer.apple.com/documentation/coretext/1508678-ctrungetpositions

            prr Philip Race
            angorya Andy Goryachev
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: