OSDN Git Service

JFM version 2: priority={<stretch>, <shrink>}
[luatex-ja/luatexja.git] / test / test04-jfm.tex
index 4355a66..6f76998 100644 (file)
@@ -49,7 +49,7 @@
 \ltjgetparameter{jacharrange}{2}
 
 \head{文字コード→文字範囲}
-\ltjgetparameter{chartorange}{`A} % must be 6
+\ltjgetparameter{chartorange}{`A} % must be -1
 \ltjgetparameter{chartorange}{`い} % must be 6
 \ltjgetparameter{chartorange}{`§} % must be 8
 \ltjgetparameter{chartorange}{"F7} % must be 9
@@ -67,7 +67,7 @@
 \head{Ticket \#25121}
 \setbox0=\hbox{\ltjsetparameter{kanjiskip=-5pt}
 あいうえお\hbox{\ltjsetparameter{kanjiskip=12pt}かきくけこ}さしすせそ\par a}\copy0
-\tracingonline=0\showboxdepth=10000\showboxbreadth=10000\tracingonline=1\showbox0
+
 
 {\ltjsetparameter{kanjiskip=3pt}
 あいうえお{\ltjsetparameter{kanjiskip=-5pt}% this setting is ignored
 \jfont\sixgt={psft:GothicBBB-Medium:jfm=ujis} at 6pt
 \font\sixtt=cmtt10 at 6pt
 
+{\let\\=\relax
+\directlua{function print_fn(...)
+  print(...)
+  tex.print('\\par ', ...)
+end}}
+\unless\ifdefined\ltjgetwd \let\ltjgetwd\wd\fi
 \def\dumplist#1{\par\noindent\leavevmode
+{\dimen0=\ltjgetwd#1}%
 \hbox to 0.2\hsize{\copy#1\hss}%
 \vbox{\hsize=0.6\hsize\sixtt\baselineskip=7.2pt\sixgt\let\\=\relax
-\directlua{luatexja.ext_show_node_list(tex.getbox(#1).head, '\\par ', tex.print)}\hrule}}
+\directlua{print('======')
+  luatexja.ext_show_node_list(tex.getbox(#1).head, '', print_fn)
+  print('======')}\hrule}%
+}
 
 %\tracingonline=1\tracingoutput=1\showboxdepth=3\showboxbreadth=100
 
 
 \head{JA--hbox (penあり)}
 
+\setbox0=\hbox{\rmlh あ\hbox{}}\dumplist0
+
+\setbox0=\hbox{\rmlh い\hbox{}}\dumplist0
+
+\setbox0=\hbox{\rmlh う\hbox{}}\dumplist0
+
+\setbox0=\hbox{\rmlh え\hbox{}}\dumplist0
+
 \setbox0=\hbox{\rmlh あ\hbox{ア}}\dumplist0
 
 \setbox0=\hbox{\rmlh あ\hbox{a}}\dumplist0
 
 \setbox0=\hbox{\rmlh \hbox{(}い\hbox{)}}\dumplist0
 
+\head{hbox--JA (penあり)}
+
+\setbox0=\hbox{\rmlh \hbox{}あ}\dumplist0
+
+\setbox0=\hbox{\rmlh \hbox{}い}\dumplist0
+
+\setbox0=\hbox{\rmlh \hbox{}う}\dumplist0
+
 \head{italic correction}
 
 \setbox0=\hbox{\it f\/(\/あ}\dumplist0
 \dumplist0}
 
 \vfill\eject
-\noindent{\gt\bf paragraph, hbox and math boundary}
+\head{その他: paragraph, hbox and math boundary}
 
 \setbox1=\vbox{\parindent19.2pt \rmlh\hsize=100pt\parfillskip=30pt
 かエ\par\global\setbox0=\lastbox}
 \dumplist0
 
 \head{その他: unhbox の連続}
+\message{HOGE}
 \setbox0=\hbox{\tenmin\setbox1=\hbox{)}\setbox2=\hbox{a}\unhbox1\unhbox2}
 \dumplist0
 
   \unhcopy1\unhbox1\unhbox2}
 \dumplist0
 
+\setbox0=\hbox{\tenmin\setbox1=\hbox{}あ\unhbox1い}
+\dumplist0
+
+\setbox0=\hbox{\tenmin\setbox1=\hbox{\tate }あ\unhbox1い}
+\dumplist0
+
 \head{その他: 「前由来」「後由来」JFM由来グルー}
 \setbox0=\hbox{\tenmin あ\fivemin (}
 \dumplist0
 
 \setbox0=\hbox{\tenmin .\fivemin ・}
 \dumplist0
+
+\head{その他: JFM and kerning}
+\jfont\kmd=KozMinPr6N-Regular.otf:jfm=test;script=latn;+kern;+liga
+\jfont\kmn=KozMinPr6N-Regular.otf:jfm=test;-kern
+
+\setbox0=\hbox{\kmd タノタイクノ}
+\dumplist0
+
+\setbox0=\hbox{\kmn タノタイクノ}
+\dumplist0
+
+\setbox0=\hbox{\kmd タ\/ノ}
+\dumplist0
+
+\setbox0=\hbox{\kmd 」カ゚.}
+\dumplist0
+
 \end