X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;f=test%2Ftest04-jfm.tex;h=7e6d82fb79c95e53dc2318cd958a92ddf6647e6c;hb=a6c37dba4272ef5de87886c805f6f902aa5f7175;hp=b209b9517258b24db1a6bf0cff507739261fa92c;hpb=36a8a9d661627d42af4560e1631763b921a31494;p=luatex-ja%2Fluatexja.git diff --git a/test/test04-jfm.tex b/test/test04-jfm.tex index b209b95..7e6d82f 100644 --- a/test/test04-jfm.tex +++ b/test/test04-jfm.tex @@ -1,9 +1,8 @@ -%#!luatex +%#!luatex test04-jfm.tex \input luatexja-core.sty - \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) @@ -28,14 +27,18 @@ \head{文字範囲の代入/取得テスト} -\ltjdefcharrange{2}{`あ,"E0-"FF} -「\char"F4」は2番の文字範囲なので,和文扱いのはず +\ltjdefcharrange{9}{`あ,"E0-"FF} +「\char"F4」は9番の文字範囲なので,和文扱いのはず -{iso8859-1 和文扱い:\ltjsetparameter{jacharrange={1}}% +{iso8859-1 和文扱い:\ltjsetparameter{jacharrange={1,8}}% \ltjgetparameter{jacharrange}{1}% § ¶ ° £ ¥ \char"F4} -{iso8859-1 欧文扱い:\ltjsetparameter{jacharrange={-1}}% +{iso8859-1 欧文扱い:\ltjsetparameter{jacharrange={-1,-8}}% +\ltjgetparameter{jacharrange}{1}% +§ ¶ ° £ ¥ \char"F4} + +{標準:% \ltjgetparameter{jacharrange}{1}% § ¶ ° £ ¥ \char"F4} @@ -46,16 +49,20 @@ \ltjgetparameter{jacharrange}{2} \head{文字コード→文字範囲} -\ltjgetparameter{chartorange}{`い} % must be 217 -\ltjgetparameter{chartorange}{`§} % must be 1 -\ltjgetparameter{chartorange}{"F7} % must be 2 +\ltjgetparameter{chartorange}{`A} % must be 6 +\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} @@ -69,8 +76,7 @@ {\ltjsetparameter{kanjiskip=3pt} あいうえおさしすせそ}\par - -\vfill\eject +\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 @@ -79,7 +85,9 @@ \def\dumplist#1{\par\noindent\leavevmode \hbox to 0.2\hsize{\copy#1\hss}% \vbox{\hsize=0.6\hsize\sixtt\baselineskip=7.2pt\sixgt\let\\=\relax -\directlua{ltj.ext_show_node_list(tex.getbox(#1).head, '\\par', tex.print)}\hrule}} +\directlua{luatexja.ext_show_node_list(tex.getbox(#1).head, '\\par ', tex.print)}\hrule}} + +%\tracingonline=1\tracingoutput=1\showboxdepth=3\showboxbreadth=100 \head{JA--JA (penなし)} @@ -141,6 +149,12 @@ \setbox0=\hbox{\rmlh え\hbox{}}\dumplist0 +\setbox0=\hbox{\rmlh あ\hbox{ア}}\dumplist0 + +\setbox0=\hbox{\rmlh あ\hbox{a}}\dumplist0 + +\setbox0=\hbox{\rmlh い\hbox{a}}\dumplist0 + \head{hbox--JA (penなし)} \setbox0=\hbox{\rmlh \hbox{}あ}\dumplist0 @@ -149,29 +163,11 @@ \setbox0=\hbox{\rmlh \hbox{}う}\dumplist0 -\head{JA--penalty (penなし)} TODO: この場合の挙動はこれで良いか? - -\setbox0=\hbox{\rmlh あ\penalty567}\dumplist0 - -\setbox0=\hbox{\rmlh い\penalty567}\dumplist0 - -\setbox0=\hbox{\rmlh う\penalty567}\dumplist0 - -\setbox0=\hbox{\rmlh え\penalty567}\dumplist0 - -\head{penalty--JA (penなし)} TODO: この場合の挙動はこれで良いか? - -\setbox0=\hbox{\rmlh \penalty567あ}\dumplist0 - -\setbox0=\hbox{\rmlh \penalty567い}\dumplist0 - -\setbox0=\hbox{\rmlh \penalty567う}\dumplist0 - {\vfill\eject% \ltjsetparameter{prebreakpenalty={`(,123}} \ltjsetparameter{postbreakpenalty={`あ,123}} -\ltjsetparameter{postbreakpenalty={`い,123}} +\ltjsetparameter{prebreakpenalty={`い,571}, postbreakpenalty={`い,123}} \ltjsetparameter{postbreakpenalty={`う,123}} \ltjsetparameter{postbreakpenalty={`え,123}} \ltjsetparameter{postbreakpenalty={`お,123}} @@ -210,6 +206,16 @@ \setbox0=\hbox{\rmlh aう}\dumplist0 +\head{JA--hbox (penあり)} + +\setbox0=\hbox{\rmlh あ\hbox{ア}}\dumplist0 + +\setbox0=\hbox{\rmlh あ\hbox{a}}\dumplist0 + +\setbox0=\hbox{\rmlh い\hbox{a}}\dumplist0 + +\setbox0=\hbox{\rmlh \hbox{(}い\hbox{)}}\dumplist0 + \head{italic correction} \setbox0=\hbox{\it f\/(\/あ}\dumplist0 @@ -220,16 +226,16 @@ \noindent{\gt\bf [x]kanjiskipの挿入} \head{kanjiskip from JFM, autospacing (JA--JA)} -\setbox0=\hbox{あ\rmlh あ}\dumplist0 +\setbox0=\hbox{\rmlh ああ}\dumplist0 {\ltjsetparameter{kanjiskip=\maxdimen} -\setbox0=\hbox{あ\rmlh あ}\dumplist0 +\setbox0=\hbox{\rmlh ああ}\dumplist0 \jfont\rmlk={psft:Ryumin-Light:jfm=test} at 12pt \setbox0=\hbox{\rmlk は\rmlh あ}\dumplist0} \def\naspc{\ltjsetparameter{autospacing=false}\relax} \def\naxspc{\ltjsetparameter{autoxspacing=false}\relax} -\setbox0=\hbox{あ\naspc ああ}\dumplist0 +\setbox0=\hbox{\rmlh あ\naspc ああ}\dumplist0 \head{kanjiskip from JFM/autoxspacing (JA--EN)} \setbox0=\hbox{\rmlh まx}\dumplist0 @@ -245,7 +251,7 @@ {\ltjsetparameter{alxspmode={`x,postonly}} \setbox0=\hbox{\rmlh まx}\dumplist0} -\head{kanjiskip from JFM/autoxspacing (EN--JA)} +\head{xkanjiskip from JFM/autoxspacing (EN--JA)} \setbox0=\hbox{\rmlh xま}\dumplist0 \setbox0=\hbox{\rmlh x\naxspc ま}\dumplist0 @@ -270,7 +276,83 @@ \setbox0=\hbox{\rmlh あ\penalty1701\penalty1701\penalty1701お} \dumplist0 -\setbox0=\hbox{\tenrm あ\/\v{A}あ} +\head{その他: italic correction and accents} + +\setbox0=\hbox{\tenrm あ\/j} +\dumplist0 +\setbox0=\hbox{\tenrm )\/j} +\dumplist0 +\setbox0=\hbox{\tenrm\rmlh れ\v{A})} +\dumplist0 + +\head{その他: box boundary} + +\setbox0=\hbox{\rmlh かあか} +\dumplist0 +\setbox0=\hbox{a\setbox3=\hbox{\rmlh かあか}\unhbox3a} +\dumplist0 +\setbox0=\hbox{a\setbox3=\hbox{\rmlh か}\box3a} +\dumplist0 +\setbox0=\hbox{\rmlh き\hbox{か}き\hbox{き}き} +\dumplist0 + +{\ltjsetparameter{postbreakpenalty={`あ,1000},prebreakpenalty={`あ,1000}} +\setbox0=\hbox{あ\hbox{(}あ\setbox3=\hbox{(}\unhbox3あ} +\dumplist0} + +\vfill\eject +\head{その他: paragraph, hbox and math boundary} + +\setbox1=\vbox{\parindent19.2pt \rmlh\hsize=100pt\parfillskip=30pt +かエ\par\global\setbox0=\lastbox} +\dumplist0 + +\setbox1=\vbox{\noindent\rmlh\hsize=100pt\parfillskip=30pt +かエ\par\global\setbox0=\lastbox} +\dumplist0 + +\setbox0=\hbox{\rmlh かエ} +\dumplist0 + +\setbox0=\hbox{\rmlh あ$a$さ$a$か} +\dumplist0 + +\head{その他: unhbox の連続} +\setbox0=\hbox{\tenmin\setbox1=\hbox{)}\setbox2=\hbox{a}\unhbox1\unhbox2} +\dumplist0 + +\setbox3=\hbox{\tenmin\setbox1=\hbox{)}\setbox2=\hbox{a}\unhbox1\unhbox2} +\setbox0=\hbox{\unhbox3} +\dumplist0 + +\setbox0=\hbox{\tenmin\setbox1=\hbox{()}\setbox2=\hbox{「」}% + \unhcopy1\unhbox1\unhbox2} +\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;+kern +\jfont\kmn=KozMinPr6N-Regular.otf:jfm=test;-kern + +\setbox0=\hbox{\kmd タノタイクノ} +\dumplist0 + +\setbox0=\hbox{\kmn タノタイクノ} +\dumplist0 + +\setbox0=\hbox{\kmd タ\/ノ} \dumplist0 \end