Closed cykerway closed 4 years ago
Unfortunately, your patch will introduce a new serious bug. The kerning between punctuations will be lost.
\documentclass{article}
\usepackage[AutoFallBack]{xeCJK}
\setCJKmainfont{FreeSerif.otf}
\setCJKfallbackfamilyfont{\CJKrmdefault}{
{Noto Serif CJK SC},
{Noto Serif CJK KR},
}
\begin{document}
测试:(测试 %% Kerning lost
\xeCJKsetup{AutoFallBack=false}
\CJKfontspec{Noto Serif CJK SC}
测试:(测试 %% Expected result
\end{document}
Looks like a problem with \xeCJK_aftergroup_reset_Boundary:N
for a previous bug. I haven't really looked into this one but I think it's irrelevant to the problem with punctuation fallbacks.
Looks like the most recent commit has fixed the new bug you raised.
Currently some punctuations would become tofu if user supplies a non-CJK font as main font, even if CJK font fallbacks are properly set. That is, fallbacks failed to guard some punctuations. This problem occurs because AutoFallBack does not implement fallbacks for \CJKpunctsymbol. Fixed the problem in this patch.
Fix https://github.com/CTeX-org/ctex-kit/issues/515