[Tex/LaTex] Korean characters scrambled [XeLaTeX; Noto Sans Korean]

fontslanguagesxetex

I was trying to find a font which has obsolete jamo and the right combining behaviour. Yesterday I found out about Noto Sans, which seems to have both of these. However, when I use it in XeTeX, I get some seemingly-arbitrary hanja (or blank spaces) instead of the expected characters.

(I’m guessing the composing behaviour will fix itself when the right characters are selected. And yes, I know that Code2000 is working perfectly in this example, but unfortunately it is the ugliest font in the world. :p)

MWE:

\documentclass{article}
\usepackage{fontspec}

% 1. precomposed: U+BB47
% 2. separate jamo: U+1106, U+116E, U+11BA
% 3. obsolete [separate jamo]: U+113B, U+119F, U+11EB
\newcommand\test[1]{#1 & {\fontspec{#1}{뭇; 뭇; ᄻᆟᇫ}} \\}

\begin{document}

\begin{tabular}{rl}
\test{Arial Unicode MS}
\test{Batang}
\test{Code2000}
\test{Gulim}
\test{GungSeo}
\test{HeadLineA}
\test{Nanum Brush Script}
\test{Nanum Myeongjo}
\test{Nanum Pen Script}
\test{Noto Sans Korean}
\test{PCMyungjo}
\test{PilGi}
\test{Adobe Gothic Std}
\test{Adobe Myungjo Std}
\test{Apple SD Gothic Neo}
\test{AppleGothic}
\test{AppleMyungjo}
\end{tabular}

\end{document}

http://cl.ly/WcUO/Screen%20Shot%202014-07-17%20at%2013.08.08.PNG

Best Answer

Noto Sans Korean or original Source Han Sans should be OK. However, you should use a latest (unreleased) version of xdvipdfmx patched by Jiang Jiang not long ago.

Realted: XeTeX: CID-keyed font support?

% !TEX program = XeLaTeX
% !TEX encoding = UTF-8
\documentclass{article}

\usepackage{fontspec}

\setmainfont{NotoSansKR-Regular.otf}
% \setmainfont{SourceHanSansK-Regular.otf}

\begin{document}

뭇; 뭇; ᄻᆟᇫ

\end{document}

enter image description here

Precompiled xdvipdfmx:

Related Question