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 \cs_set_eq:NN \DeclareFontFamily \DeclareKanjiFamily
21 \fontspec_select:nn{JFM=ujis,#1}{#2}
25 \cs_new:Nn \ltj_fontspec_set_family:Nnn {
26 \ltj_fontspec_select:nn{#2}{#3}
27 \tl_set_eq:NN #1 \zf@family
30 \DeclareDocumentCommand \jfontspec { O{} m } {
31 \ltj_fontspec_set_family:Nnn \k@family {#1}{#2}
36 \DeclareDocumentCommand \setmainjfont { O{} m } {
37 \ltj_fontspec_set_family:Nnn \mcdefault {#1}{#2}
41 \DeclareDocumentCommand \setsansjfont { O{} m } {
42 \ltj_fontspec_set_family:Nnn \gtdefault {#1}{#2}
46 \DeclareDocumentCommand \newjfontfamily { m O{} m } {
47 \ltj_fontspec_select:nn{#2}{#3}
49 \exp_not:N \DeclareRobustCommand \exp_not:N #1 {
50 \exp_not:N \kanjifamily {\zf@family} \exp_not:N \selectfont