OSDN Git Service

lltjdefs: include \jttdefault in \verbatim@font
[luatex-ja/luatexja.git] / test / test01.tex
1 %#! time luatex test01
2 \input luatexja-core.sty
3
4 \jfont\jisninety={file:KozMinPr6N-Regular.otf:script=latn;+jp90;jfm=ujis}
5 \jfont\jisfour={file:KozMinPr6N-Regular.otf:script=latn;+jp04;jfm=ujis}
6 \jfont\jisexpt={file:KozMinPr6N-Regular.otf:script=latn;+expt;jfm=ujis}
7 \jfont\jishwid={file:KozMinPr6N-Regular.otf:script=latn;+hwid;jfm=ujis}
8 \jfont\jispalt={file:KozMinPr6N-Regular.otf:script=latn;+palt;jfm=ujis}
9 %\font\tmihwid={file:KozMinPr6N-Regular.otf:script=latn;+hwid}
10 \jfont\jisnalt={file:KozMinPr6N-Regular.otf:script=latn;+nalt;jfm=ujis}
11 \jfont\jistrad={file:KozMinPr6N-Regular.otf:script=latn;+trad;jfm=ujis}
12 \jfont\jissups={file:KozMinPr6N-Regular.otf:script=latn;+sups;jfm=ujis}
13 \jfont\jisliga={file:KozMinPr6N-Regular.otf:script=latn;+liga;jfm=ujis}
14 %\font\tmiliga={file:KozMinPr6N-Regular.otf:script=latn;+liga}
15 \jfont\jisvert={file:KozMinPr6N-Regular.otf:script=latn;+vert;jfm=ujis}
16 \parskip=\smallskipamount\parindent=1\zw
17
18 {\noindent\bf\tengt jfm-ujis.luaを使用}
19
20 \bigskip
21
22 {\noindent\bf\tengt ■luaotf\/loadによるfeatureとの共存状況}
23
24 {\tentt expt} feature: 剥→{\jisexpt 剥}
25
26 {\tentt jp90} feature: 辻→{\jisninety 辻}
27
28 {\tentt jp04} feature: 辻→{\jisfour 辻}
29
30 {\tentt hwid} feature: アイウエ→{\jishwid アイウエ}
31
32 {\tentt palt} feature: トップクォーク→{\jispalt トップクォーク}\hfil\break
33
34 {\tentt nalt} feature: 男→{\jisnalt 男}
35
36 {\tentt trad} feature: 医学→{\jistrad 医学}
37
38 {\tentt sups} feature: 注1注1→{\jissups 注1注1}\hfil\break
39 ↑まだ上付き文字用の文字クラスを作ってない.
40
41 {\tentt liga} feature: か゚き゚く゚け゚こ゚→{\jisliga か゚き゚く゚け゚こ゚}\hfil\break
42 ↑合字用の半濁点({\tentt U+309A})を用いれば成功する.単体用({\tentt U+309C})では失敗する.%比較:{\tmiliga か゜き゜く゜け゜こ゜}
43
44 {\tentt vert} feature: あ(㌢㍍),い→{\jisvert あ(㌢㍍),い}\hfil\break
45 ↑縦組み時に気にすればいいか.
46
47 \bigskip
48
49 \noindent あいうえお
50
51 「あいうえお←全角下がりが正しい({\tt'boxbdd'}のテスト1)
52
53 {\tt'boxbdd'}のテスト2: \vrule\hbox{「」}\vrule ←正しい実装ならば2本の罫線の間は全角幅
54
55
56 \bigskip
57 {\noindent\bf\tengt ■{\tt differentjfm}による挙動の違い}
58
59 \jfont\tenMa={file:KozMinPr6N-Regular.otf:jfm=ujis}
60 \jfont\tenMb={file:KozMinPr6N-Regular.otf:jfm=jis;jfmvar=a}
61 \jfont\tenGa={file:ipaexg.ttf:jfm=ujis} at 15pt
62 \jfont\tenGb={file:ipaexg.ttf:jfm=jis;jfmvar=a} at 15pt\relax
63 \def\djtest{%
64 {\tt Ma-Ma}: \setbox0=\hbox{{\tenMa )}{\tenMa  ・}}\hbox to 90pt{\copy0\hss(\the\wd0)},
65 {\tt Ma-Mb}: \setbox0=\hbox{{\tenMa )}{\tenMb ・}}\hbox to 90pt{\copy0\hss(\the\wd0)},
66 {\tt Mb-Mb}: \setbox0=\hbox{{\tenMb )}{\tenMb ・}}\hbox to 90pt{\copy0\hss(\the\wd0)},
67
68 {\tt Ma-Ga}: \setbox0=\hbox{{\tenMa )}{\tenGa ・}}\hbox to 90pt{\copy0\hss(\the\wd0)},
69 {\tt Ma-Gb}: \setbox0=\hbox{{\tenMa )}{\tenGb ・}}\hbox to 90pt{\copy0\hss(\the\wd0)},
70 {\tt Mb-Gb}: \setbox0=\hbox{{\tenMb )}{\tenGb ・}}\hbox to 90pt{\copy0\hss(\the\wd0)}%
71 }
72
73 {\noindent\bf\tengt {\tt differentjfm=small}(小さい方)}
74
75 \ltjsetparameter{differentjfm=small}\djtest
76
77 {\noindent\bf\tengt {\tt differentjfm=large}(大きい方)}
78
79 \ltjsetparameter{differentjfm=LARGE}\djtest
80
81 {\noindent\bf\tengt {\tt differentjfm=average}(平均)}
82
83 \ltjsetparameter{differentjfm=AVERAGE}\djtest
84
85 {\noindent\bf\tengt {\tt differentjfm=both}(合計)}
86
87 \ltjsetparameter{differentjfm=Both}\djtest
88
89 {\noindent\bf\tengt {\tt differentjfm=pleft}(左側の指定で比例配分)}
90
91 \ltjsetparameter{differentjfm=pleft}\djtest
92
93 {\noindent\bf\tengt {\tt differentjfm=pright}(右側の指定で比例配分)}
94
95 \ltjsetparameter{differentjfm=pright}\djtest
96
97 {\noindent\bf\tengt {\tt differentjfm=paverage}(default, 左・右それぞれの指定で比例配分した値の平均)}
98
99 \ltjsetparameter{differentjfm=paverage}\djtest
100
101 \bigskip
102 {\noindent\bf\tengt ■ujis, jis, min}
103
104 \def\test#1{\jfont\mx={file:KozMinPr6N-Regular.otf:jfm=#1}
105 \par\noindent\hbox to 30pt{#1}%
106 \hbox to 250pt{\mx ちょっとチェックしちゃった!が,まあいいです。\hss}%
107 \hbox{\mx「大」、「小」,‘国’“国”――……}}
108
109 \test{ujis}
110 \test{jis}
111 \test{min}
112
113 \bigskip
114 {\noindent\bf\tengt ■pdftotext}
115 \jfont\jisnorm={file:KozMinPr6N-Regular.otf:script=latn;color=0000007f;jfm=ujis}
116 \jfont\jishkna={file:KozMinPr6N-Regular.otf:script=latn;+hkna;color=ff00007f;jfm=ujis}
117 \jfont\jisvkna={file:KozMinPr6N-Regular.otf:script=latn;+vkna;color=0000ff7f;jfm=ujis}
118
119 \setbox0=\hbox{\jisnorm あいうえお}
120 \setbox2=\hbox{\jishkna あいうえお}
121 \setbox4=\hbox{\jisvkna あいうえお}
122
123 \leavevmode \copy0 \rlap{\copy0}\copy2 \copy2
124
125 \leavevmode \rlap{\copy0}\copy4 \rlap{\copy2}\copy4
126
127 \leavevmode \copy4
128
129 \end