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_featstr:n {jfm=#1}
16 \cs_new:Nn \ltj_fontspec_select:nn {
18 \tl_set:Nn \zf@enc {JY3}
19 \fontspec_select:nn{JFM=ujis,#1}{#2}
20 \cs_undefine:c{g_fontspec_ \zf@family _prop}
21 \fontspec_select:nn{JFM=ujis,#1}{#2}
23 \cs_undefine:c{g_fontspec_ \zf@family _prop}
26 \cs_new:Nn \ltj_fontspec_set_newjfamily:Nnn {
27 \ltj_fontspec_select:nn{#2}{#3}
28 \tl_set_eq:NN #1 \zf@family
31 \DeclareDocumentCommand \jfontspec { O{} m } {
32 \ltj_fontspec_set_newjfamily:Nnn \k@family {#1}{#2}
37 \DeclareDocumentCommand \setmainjfont { O{} m } {
38 \ltj_fontspec_set_newjfamily:Nnn \mcdefault {#1}{#2}
42 \DeclareDocumentCommand \setsansjfont { O{} m } {
43 \ltj_fontspec_set_newjfamily:Nnn \gtdefault {#1}{#2}
47 \DeclareRobustCommand\jfontfamily[1]{\edef\k@family{#1}}
49 \DeclareDocumentCommand \newjfontfamily { m O{} m } {
50 \ltj_fontspec_select:nn{#2}{#3}
52 \exp_not:N \DeclareRobustCommand \exp_not:N #1 {
53 \exp_not:N \jfontfamily {\zf@family} \exp_not:N \selectfont