OSDN Git Service

patches/lltjp-xunicode.sty: stopped to hardcode `EU2'
[luatex-ja/luatexja.git] / test / test04-jfm.tex
index c2ad3f5..6f76998 100644 (file)
@@ -1,9 +1,8 @@
-%#!luatex test04-jfm ; pdftotext test04-jfm.pdf /tmp/new
+%#!luatex test04-jfm.tex
 \input luatexja-core.sty
-\pdfcompresslevel=0
 \def\head#1{\medskip\penalty-100\noindent{\bf\tengt ■ #1}\par\penalty10000 }
 \jfont\rml={psft:Ryumin-Light:jfm=ujis} at 10pt
-\rml あ\inhibitglue\char"201Cあ・い←Ryumin-Light
+\rml あ\inhibitglue\char"201Cあ・い\inhibitglue ()あ←Ryumin-Light
 
 \jfont\rml={file:ipam.ttf:jfm=ujis} at 10pt
 \rml あ\inhibitglue\char"201Cあ・い←IPA\hbox{}明朝 (ipam)
 \ltjgetparameter{jacharrange}{2}
 
 \head{文字コード→文字範囲}
+\ltjgetparameter{chartorange}{`A} % must be -1
 \ltjgetparameter{chartorange}{`い} % must be 6
 \ltjgetparameter{chartorange}{`§} % must be 8
 \ltjgetparameter{chartorange}{"F7} % must be 9
 \ltjgetparameter{chartorange}{-1}  % must be error "
+\ltjgetparameter{chartorange}{"CFFFF}  % must be 217"
 
 \medskip
 \ltjsetparameter{jacharrange={-217}}
-ほとんど欧文扱い.2番は別(「あ」)
+あ\char"CFFFFあ
+\ltjgetparameter{jacharrange}{\ltjgetparameter{chartorange}{"CFFFF}}←CFFFF欧文扱い
 \ltjsetparameter{jacharrange={218}}
-和文扱いにもどる
+あ\char"CFFFFあ
+\ltjgetparameter{jacharrange}{\ltjgetparameter{chartorange}{"CFFFF}}←CFFFF和文扱い
 
 \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
 {\ltjsetparameter{kanjiskip=3pt}
 あいうえおさしすせそ}\par
 
-
 \vfill\eject\tracingonline=0
 \noindent{\bf\gt  以下はJFMグルー挿入検証}
 \jfont\rmlh={psft:Ryumin-Light:jfm=test} at 10pt
 \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
 
 \setbox0=\hbox{\tenrm あ\/j}
 \dumplist0
+\setbox0=\hbox{\tenrm )\/j}
+\dumplist0
 \setbox0=\hbox{\tenrm\rmlh れ\v{A})}
 \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
 
 \setbox0=\hbox{\tenmin\setbox1=\hbox{()}\setbox2=\hbox{「」}%
   \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{\fivemin あ\tenmin (}
+\dumplist0
+
+\setbox0=\hbox{\fivemin .\tenmin ・}
+\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