OSDN Git Service

Merge branch 'cancel_profile_otr' into kitagawa_test
[luatex-ja/luatexja.git] / test / test33-jfm_feature.tex
1 %#!luatex
2 \input lua-visual-debug.sty
3 \input luatexja-otf.sty
4 \catcode`\@=11
5 \jfont \testA=\ltj@stdmcfont:jfm=ujis/hoge,piyo at 9.62216pt
6 \jfont \testB=\ltj@stdmcfont:jfm=ujis/{piyo,,,,,+hoge,,,,};jp90 at 9.62216pt
7 \jfont \testC=\ltj@stdgtfont:jfm=ujis/,,,,;+jp90 at 9.62216pt
8 %\jfont \testD=\ltj@stdgtfont:jfm=/abcd;+trad at 9.62216pt % error
9 \jfont \testE=\ltj@stdmcfont:jfm=ujis/piyo,hoge=2,+foo,-bar,mog=6,,l=true,g=false;jp90 at 9.62216pt
10 \jfont \testE=\ltj@stdmcfont:jp90;jfm=ujis/{-bar,-g,foo,hoge=2,l,mog=6,piyo};color=6faf5f at 9.62216pt
11
12 \def\DISP#1{{\noindent\tentt \string#1: \meaning#1}\par}
13
14 \DISP\testA
15 \DISP\testB
16 \DISP\testC
17 \DISP\testD
18 \DISP\testE
19
20 \ltjsetparameter{differentjfm=both}
21 {\testA (あ葛鴎)}{\testB (い葛鴎)}{\testC (う葛鴎)}(え葛鴎){\tengt(あ葛鴎)}{\testE あおうえお}\par
22
23 \ltjsetparameter{differentjfm=paverage}
24 {\testA (あ葛鴎)}{\testB (い葛鴎)}{\testC (う葛鴎)}(え葛鴎){\tengt(あ葛鴎)}{\testE あおうえお}\par
25
26 \medskip
27 \hrule
28 \medskip
29 \font\testOA=lmroman10-regular:letterspace=0.01
30 \jfont\testF=\ltj@stdmcfont:jfm=ujis;letterspace=50 at 9.62216pt
31 {\testOA \testF
32   A quick brown fox 跳』\inhibitglue (躍)(した:) over the のろ……まな 犬.
33 }
34
35 \directlua{
36   local ltb = luatexbase
37   print(table.serialize(ltb.callback_descriptions('pre_linebreak_filter')))
38   print(table.serialize(ltb.callback_descriptions('hpack_filter')))
39 }
40
41 {\testOA \testF
42   A quick brown fox 跳』\inhibitglue (躍)(した:) over the のろ……まな 犬.
43   
44   A quick fox 跳』\inhibitglue (躍)(した:) over the のろ……まな 犬.ああああああ
45
46 }
47
48 \def\printjfmfeat#1{%
49   \relax{\tentt\string#1}: 
50   \directlua{%
51     local fn
52     fn = function (t) 
53       for i,v in pairs(t) do
54         tex.sprint('[{\string\\tentt ' .. i .. '}]${}={}$')
55         if type(v)=='string' then
56           tex.sprint('``{\string\\tentt ' .. tostring(v) .. "}'', ")
57         elseif type(v)=='table' then
58           tex.sprint('$\string\\{$'); fn(v); tex.sprint('$\string\\}$, ')
59         else
60           tex.sprint(tostring(v) ..', ')
61         end
62       end
63     end
64     if myjfm then fn(myjfm) else tex.sprint('(nil)')  end
65   }\par
66 }
67
68 \jfont\testP=KozMinPr6N-Regular:jfm=ujis/h,-p,l=g,z=true;jfm=testf/q,-d,l=f,z=h,e,hwid;trad  at 9pt
69 \printjfmfeat\testP
70 \testP イ医学
71
72 \jfont\testQ=KozMinPr6N-Regular:jfm=testf/{+w,h={+a,-b,c=true,u=x,t={s,a}},-o,d={}};trad  at 9pt
73 \printjfmfeat\testQ
74
75 \jfont\testR=KozMinPr6N-Regular:jfm=testf/{};trad  at 9pt
76 \printjfmfeat\testR
77 \bye