\@ajligdef{#1}{\number\@tempcnta}\advance\@tempcnta\@ne
\expandafter\@ajligaturedef\fi}
\def\@aj@ligdef#1#2#3{\expandafter\xdef\csname ajLig\@ajmojifam#1\endcsname
- {\noexpand\CID{\noexpand\unless\noexpand\ifnum\noexpand\ltjgetparameter\noexpand{direction\noexpand}=3 #2\noexpand\else#3\noexpand\fi}}}
+ {\unexpanded{\unless\ifnum\ltjgetparameter{direction}=3 }%
+ \noexpand\CID{#2}\noexpand\else\noexpand\CID{#3}\noexpand\fi}}
\def\@aj@ligaturedef#1{\ifx\@nil#1\else
\@aj@ligdef{#1}{\number\@tempcnta}{\number\@tempcntb}%
\advance\@tempcnta\@ne\advance\@tempcntb\@ne
local w = ltjr_cidfont_data["Adobe-Japan1"].characters[v]. tounicode
-- must be non-nil!
local i = string.len(w)
+ local r
if i==4 then -- UCS2
- return tonumber(w,16)
+ r = tonumber(w,16)
elseif i==8 then
i,w = tonumber(string.sub(w,1,4),16), tonumber(string.sub(w,-4),16)
if (w>=0xD800) and (w<=0xDB7F) and (i>=0xDC00) and (i<=0xDFFF) then -- Surrogate pair
- return (w-0xD800)*0x400 + (i-0xDC00)
+ r = (w-0xD800)*0x400 + (i-0xDC00)
else
- return 0
+ r = 0
end
end
+ if ltjr_cidfont_data["Adobe-Japan1"].shared.ltj_vert_table[r] then
+ -- CID が縦組用字形だった場合
+ local curjfnt_num = tex_get_attr((ltjd_get_dir_count()==dir_tate)
+ and attr_curtfnt or attr_curjfnt)
+ local t = identifiers[curjfnt_num]
+ if t.resources.sequences then
+ for _,i in pairs(t.resources.sequences) do
+ if (i.order[1]=='vert' or i.order[1]=='vrt2')
+ and i.type == 'gsub_single' and i.steps then
+ for _,j in pairs(i.steps) do
+ if type(j)=='table' then
+ if type(j.coverage)=='table' then
+ for i,k in pairs(j.coverage) do
+ if i==r then return k end
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ return r
end
end
for i = 0,kx[2] do cidm[i] = -1 end
open_cmap_file(kx[1] .. "-V", increment, tonumber, entry)
for i,v in pairs(tt) do
- ttv[i] = cidmo[v.index]
+ ttv[i] = cidmo[v.index] -- "unicode" of vertical variant
end
-- tounicode エントリ
\documentclass{ltjsarticle}
\usepackage{luacode}
\usepackage{luatexja-otf}
+\usepackage[sourcehan,nfssonly]{luatexja-preset}
\begin{document}
-※このファイルはフォントを埋め込んでいないため,代替されるフォントによっては正しく
-表示されないでしょう.
+※このファイルは源ノ明朝・源ノ角ゴシックを埋め込んでいます.
森\UTF{9DD7}外と内田百\UTF{9592}とが\UTF{9AD9}島屋に行くところを想像した。
{\bf(速報)}世界陸上\CID{20660},\ajLig{ボルト}がフライングで失格.
+
+\ajLig{明治}\ajLig{大正}\ajLig{昭和}\ajLig{平成}\ajLig{令和}%
+\textgt{\ajLig{明治}\ajLig{大正}\ajLig{昭和}\ajLig{平成}\ajLig{令和}}
+
+\hbox{\tate
+ \ajLig{明治}\ajLig{大正}\ajLig{昭和}\ajLig{平成}\ajLig{令和}%
+ \textgt{\ajLig{明治}\ajLig{大正}\ajLig{昭和}\ajLig{平成}\ajLig{令和}}}
+
+
\aj半角{半角カタカナひらがな} %←JFM の問題か,半角ひらがなが全角幅で出てしまう.
←luatexja-otf.sty内で,JFMの文法拡張を行いました.
\newpage
-\section*{Adobe-Japan1-6 全グリフ}
+\section*{Adobe-Japan1-7 全グリフ}
{\footnotesize
% 表の作成は Lua でサボってしまう.
% \CID{0} (.notdef) は luaotfload がマッピングしてくれないみたい.
\begin{luacode*}
-for i = 0, 23057 do
+for i = 0, 23059 do
if i % 50 == 0 then
tex.print(string.format("\\noindent%05d", i))
end