- \ltj_fontspec_if_liiikeys:F {
- \tl_set_eq:NN \l_fontspec_family_tl \zf@family
- }
-}
-
-\cs_new:Nn \ltj_fontspec_set_family:Nnn {
- \ltj_fontspec_select:nn{#2}{#3}
- \tl_set_eq:NN #1 \l_fontspec_family_tl
-}
-
-\DeclareDocumentCommand \jfontspec { O{} m } {
- \ltj_fontspec_set_family:Nnn \k@family {#1}{#2}
- \selectfont
- \ignorespaces
-}
-
-\DeclareDocumentCommand \setmainjfont { O{} m } {
- \ltj_fontspec_set_family:Nnn \mcdefault {#1}{#2}
- \normalfont
-}
-
-\DeclareDocumentCommand \setsansjfont { O{} m } {
- \ltj_fontspec_set_family:Nnn \gtdefault {#1}{#2}
- \normalfont
-}
-
-\DeclareDocumentCommand \newjfontfamily { m O{} m } {
- \ltj_fontspec_select:nn{#2}{#3}
- \use:x {
- \exp_not:N \DeclareRobustCommand \exp_not:N #1 {
- \exp_not:N \kanjifamily {\l_fontspec_family_tl} \exp_not:N \selectfont
- }
- }
-}
-
-\DeclareDocumentCommand \newjfontface { m O{} m } {
- \newjfontfamily #1 [ BoldFont={},ItalicFont={},SmallCapsFont={},#2 ] {#3}
-}
-
-\DeclareDocumentCommand \defaultjfontfeatures {m} {
- \tl_set:Nn \g_ltj_fontspec_default_fontopts_tl {#1,}
-}
-
-\tl_clear:N \g_ltj_fontspec_default_fontopts_tl
-
-\DeclareDocumentCommand \addjfontfeatures {m} {
- \ifcsname zf@family@fontdef\k@family\endcsname
- \group_begin:
- \tl_clear:N \g_ltj_fontspec_default_fontopts_tl
- \use:x {
- \exp_not:N\ltj_fontspec_select:nn
- {\csname zf@family@options\k@family\endcsname,#1}
- {\csname zf@family@fontname\k@family\endcsname}
- }
- \group_end:
- \fontfamily\l_fontspec_family_tl\selectfont
- \else
- \ltj_fontspec_warning:n {addjfontfeatures-ignored}
- \fi
- \ignorespaces