2 % luatexja-fontspec.sty
5 \NeedsTeXFormat{LaTeX2e}
6 \ProvidesPackage{luatexja-fontspec}[2011/08/17 v0.1]
8 \RequirePackage{luatexja,fontspec}
12 \define@key[zf]{options}{JFM}{
13 \fontspec_update_fontid:n {+jfm=#1}
14 \fontspec_update_featstr:n {jfm=#1}
17 \cs_new:Nn \ltj_fontspec_select:nn {
19 \tl_set:Nn \zf@enc {JY3}
20 \fontspec_select:nn{JFM=ujis,#1}{#2}
24 \cs_new:Nn \ltj_fontspec_set_newjfamily:Nnn {
25 \ltj_fontspec_select:nn{#2}{#3}
26 \tl_set_eq:NN #1 \zf@family
29 \DeclareDocumentCommand \jfontspec { O{} m } {
30 \ltj_fontspec_set_newjfamily:Nnn \k@family {#1}{#2}
35 \DeclareDocumentCommand \setmainjfont { O{} m } {
36 \ltj_fontspec_set_newjfamily:Nnn \mcdefault {#1}{#2}
40 \DeclareDocumentCommand \setsansjfont { O{} m } {
41 \ltj_fontspec_set_newjfamily:Nnn \gtdefault {#1}{#2}
45 \DeclareRobustCommand\jfontfamily[1]{\edef\k@family{#1}}
47 \DeclareDocumentCommand \newjfontfamily { m O{} m } {
48 \ltj_fontspec_select:nn{#2}{#3}
50 \exp_not:N \DeclareRobustCommand \exp_not:N #1 {
51 \exp_not:N \jfontfamily {\zf@family} \exp_not:N \selectfont