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
|