LuaTeX-ja+Noto CJK(Source Han)で2倍ダーシ(U+2015 2文字並べ)が崩れる
U+2015 を並べた場合がうまく組まれるようなソース shs_two-em.tex を作りました.上に添付してあります. この中の
\usepackage{luacode} \begin{luacode} ... \end{luacode}を \documentclass によるクラス読み込み直後に書いてみて下さい. なお,pdf でも分かるように,U+2014 を並べた場合にはまだ対応していません(U+2014 を並べると U+2E3A TWO-EM DASH という別のグリフが出てきます).
本来は合字の情報だったり縦書きグリフの原点(OpenType フォントの VORG テーブル)をきちんとみるべきですが,前者は面倒だったので,また後者は内部で使っている luaotfload がそもそも VORG テーブルを読まないので,いずれもきちんとはやっていません.Lua コードのコメント中にあるような安直な判断基準で「このグリフは倍角ダーシだな」と判断させています.
h7k への返信
U+2015 を並べた場合がうまく組まれるようなソース shs_two-em.tex を作りました.
おっと,LuaTeX-ja 側を 9b34f19 に更新する必要があることを忘れていました. 同じ変更ですが,ltj-jfont.lua の末尾に次の 1 行をたしても良いです:
luatexja.jfont.update_jfm_cache = update_jfm_cache
20180825.0 を出しましたが,shs_two-em.tex に載せたコードは「倍角ダーシか」の判定基準がフォント依存なので,本体には含めていません.
Greetings from the CTeX team! The problem of the ligatures of U+2014 also appears in regards to xeCJK, see https://github.com/CTeX-org/ctex-kit/issues/382 The current xeCJK solution seems to be more complicated because XeTeX is not as flexible as LuaTeX. Basically, I proposed a new character class only for U+2014 and U+2015, in which no \CJKglue (the luatex-ja version is \kanjiskip I believe) is added between these characters. The new class behaves almost identical to FullRight (full-width closing punctuation marks) except that it allows ligatures.
Although I agree that the solution is font dependent, but I am leaning towards a user interface where people can say something like EmDashLigatures=true to activate the Source Han/Noto CJK behavior, while the default internal is EmDashLigatures=false.
I defined new character classes for U+2014, U+2E3A, U+2E3B respectively (commit 1a54137). With new "round_threshold=..." specification in JFM, now a ligature from two (or three) em-dash/horizontal bars should typeset correctly.
2020517.0 を出しましたので,完了とします.
TeX forum 中に同名の報告があったので,こちらにも貼っておきます.