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 中に同名の報告があったので,こちらにも貼っておきます.
日頃から、素晴らしいパッケージを開発・維持してくださり、感謝いたします。 題名のとおり、 ******** \documentclass{ltjtarticle} %\documentclass{ltjsarticle} \usepackage[noto-otf,match]{luatexja-preset} \begin{document} しかし――そして――なぜなら――!――まさか――?――『聞こえますか……――』――終 \textsf{しかし――そして――なぜなら――!――まさか――?――『聞こえますか……――』――終} \end{document} ******** このようなソースをlualatexでコンパイルすると、縦書き・横書きともに2倍ダーシが崩れます。 Noto CJK/Source Hanフォントでは、―(U+2015)を2文字並べると合字が出力されているように見えますが、 縦書きでは前に1文字ぶん陥没し、横書きでは後ろに1文字ぶん陥没してしまいます。 この問題はすでに開発サイドでも把握済みでしょうか? 現状では\ruleを使った自作のマクロで対応していますが、記号がベタ打ちできると便利だと思います。 テスト環境はUbuntu Linux 18.04にTUGの(Ubuntuレポジトリではない)Vanilla Tex Live 2018です。