Details
-
Bug
-
Resolution: Fixed
-
P3
-
8
-
master
-
os_x
Backports
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8235384 | openjdk8u242 | Yuri Nesterenko | P3 | Resolved | Fixed | b05 |
JDK-8221668 | 8u221 | Philip Race | P3 | Resolved | Fixed | b02 |
JDK-8224420 | emb-8u221 | Philip Race | P3 | Resolved | Fixed | b02 |
Description
On the MacOS JRE, when the font is set to Dialog (or Lucida Grande) :
Graphics2D.drawString() does not shape the decomposed Korean characters into
a precomposed form. Whereas on Windows those are rendered into a precomposed
form.
For instance, \u1100\u1161 should be shaped into \uAC00 as like Windows JRE
does.
g2.drawString("\u1100\u1161\u1102\u1161", 10, 20);
g2.drawString("\uAC00\uB098", 10, 50);
Please note:
- On Mac Dialog is mapped to "Lucida Grande"
- "Lucida Grande" does not have CJK glyphs. Korean characters fallback
to some other fonts. It looks like \uAC00 is mapped to "Apple SD Gothic Neo"
and \u1100\u1161 is mapped to "Apple Gothic"
- "Apple SD Gothic Neo" itself has both \uAC00 and \u1100\u1161. e.g. we
wonder why \u1100\u1161 does not fallback to Apple SD Gothic Neo.
This problem was found when testing on MacOS High Sierra which has changes with
the filename normalization. e.g. when uploading a filename from mac OS X
high Sierra with Firefox, the decomposed strings are used and seeing those
problems.
More discussion is available here.
https://asciiwwdc.com/2017/sessions/715
https://developer.apple.com/library/archive/documentation/FileManagement/Conceptual/APFS_Guide/FAQ/FAQ.html
Graphics2D.drawString() does not shape the decomposed Korean characters into
a precomposed form. Whereas on Windows those are rendered into a precomposed
form.
For instance, \u1100\u1161 should be shaped into \uAC00 as like Windows JRE
does.
g2.drawString("\u1100\u1161\u1102\u1161", 10, 20);
g2.drawString("\uAC00\uB098", 10, 50);
Please note:
- On Mac Dialog is mapped to "Lucida Grande"
- "Lucida Grande" does not have CJK glyphs. Korean characters fallback
to some other fonts. It looks like \uAC00 is mapped to "Apple SD Gothic Neo"
and \u1100\u1161 is mapped to "Apple Gothic"
- "Apple SD Gothic Neo" itself has both \uAC00 and \u1100\u1161. e.g. we
wonder why \u1100\u1161 does not fallback to Apple SD Gothic Neo.
This problem was found when testing on MacOS High Sierra which has changes with
the filename normalization. e.g. when uploading a filename from mac OS X
high Sierra with Firefox, the decomposed strings are used and seeing those
problems.
More discussion is available here.
https://asciiwwdc.com/2017/sessions/715
https://developer.apple.com/library/archive/documentation/FileManagement/Conceptual/APFS_Guide/FAQ/FAQ.html
Attachments
Issue Links
- backported by
-
JDK-8221668 [macos] Hangul text does not shape to the precomposed form on JDK8u
- Resolved
-
JDK-8224420 [macos] Hangul text does not shape to the precomposed form on JDK8u
- Resolved
-
JDK-8235384 [macos] Hangul text does not shape to the precomposed form on JDK8u
- Resolved