\ifmmode\copy\strutbox\else\unhcopy\strutbox\fi
% \else
% \ifmmode\copy\tstrutbox\else\unhcopy\tstrutbox\fi
-% \fi}
+% \fi
}
\def\tstrut{\relax\hbox{\tate
\ifmmode\copy\tstrutbox\else\unhcopy\tstrutbox\fi}}
\inlist@\expandafter\tmp@item\expandafter{\notkfam@list}%
\ifin@ \@notkfamtrue
\else
- \@tempswzfalse
- \def\fam@elt{\noexpand\fam@elt}%
- \message{(I search kanjifont definition file:}%
- \def\enc@elt<##1>{\message{.}%
- \edef\reserved@a{\lowercase{\noexpand\IfFileExists{##1#1.fd}}}%
- \reserved@a{\@tempswztrue}{}\relax}%
- \kenc@list
- \message{)}%
- \if@tempswz
- \edef\k@family{#1}%
- \else
+ %% \@tempswzfalse
+ %% \def\fam@elt{\noexpand\fam@elt}%
+ %% \message{(I search kanjifont definition file:}%
+ %% \def\enc@elt<##1>{\message{.}%
+ %% \edef\reserved@a{\lowercase{\noexpand\IfFileExists{##1#1.fd}}}%
+ %% \reserved@a{\@tempswztrue}{}\relax}%
+ %% \kenc@list
+ %% \message{)}%
+ %% \if@tempswz
+ %% \edef\k@family{#1}%
+ %% \else
\@notkfamtrue
\xdef\notkfam@list{\notkfam@list\fam@elt<#1>}%
- \fi
+ %% \fi
\fi\fi
\expandafter\expandafter\expandafter
\inlist@\expandafter\tmp@item\expandafter{\ffam@list}%
--- /dev/null
+%
+% luatexja-fontspec.sty
+%
+
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{luatexja-fontspec}[2011/08/17 v0.1]
+
+\RequirePackage{luatexja,fontspec}
+
+\ExplSyntaxOn
+
+\define@key[zf]{options}{JFM}{
+ \fontspec_update_fontid:n {+jfm=#1}
+ \fontspec_update_featstr:n {jfm=#1}
+}
+
+\cs_new:Nn \ltj_fontspec_select:nn {
+ \group_begin:
+ \tl_set:Nn \zf@enc {JY3}
+ \cs_set_eq:NN \DeclareFontFamily \DeclareKanjiFamily
+ \fontspec_select:nn{JFM=ujis,#1}{#2}
+ \group_end:
+}
+
+\cs_new:Nn \ltj_fontspec_set_family:Nnn {
+ \ltj_fontspec_select:nn{#2}{#3}
+ \tl_set_eq:NN #1 \zf@family
+}
+
+\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 {\zf@family} \exp_not:N \selectfont
+ }
+ }
+}
+
+\endinput
%#! lualatex
\documentclass{article}
\usepackage{luatexja}
+\usepackage{luatexja-fontspec}
+\nonstopmode
\makeatletter
% from jsclasses
\ltjsetparameter{xkanjiskip={0.25em plus 0.15em minus 0.06em}}%
\fi}
+\makeatother
\begin{document}
\section{NFSS2}
◆あいうえおabcかきく{\gt かきくa{\bf uyあ}いう}
-{\ltjsetparameter{xkanjiskip=0pt}イタリック補正\textit{f}◆\par}
+{\ltjsetparameter{xkanjiskip=0pt}イタリック補正\textit{f}◆{\it f\/}◆\par}
\DeclareFixedFont{\dr}{JY3}{gt}{m}{n}{12}
あいうえおpqr{\dr かaiu}きく){\bf (漢字}
+{abcdfghjfgあいう辻)\textbf{(辻あ{\Large あ}いう)}}
+
+{abcdfghjfgあいう辻)\textbf{\unkern(辻あ{\Large あ}いう}}
+
+\noindent{\tiny ◆あいうえおabcかきく{\gt かきくa{\bf uyあ}いう}}
+
+\noindent{\scriptsize ◆あいうえおabcかきく{\gt かきくa{\bf uyあ}いう}}
+
+\noindent{\footnotesize ◆あいうえおabcかきく{\gt かきくa{\bf uyあ}いう}}
+
+\noindent{\small ◆あいうえおabcかきく{\gt かきくa{\bf uyあ}いう}}
+
+\noindent{\normalsize ◆あいうえおabcかきく{\gt かきくa{\bf uyあ}いう}}
+
+\noindent{\large ◆あいうえおabcかきく{\gt かきくa{\bf uyあ}いう}}
+
+\noindent{\Large ◆あいうえおabcかきく{\gt かきくa{\bf uyあ}いう}}
+
+\noindent{\LARGE ◆あいうえおabcかきく{\gt かきくa{\bf uyあ}いう}}
+%\end{document}
+
\section{fontspec}
-かいてない
-\end{document}
+\setmainfont{TeXGyreTermes}
+\setsansfont{TeXGyreHeros}
+\setmainjfont[Scale=.95,BoldFont=IPAexGothic]{IPAexMincho} % default: JFM=ujis
+\setsansjfont[Scale=.95]{IPAexGothic}
-%%%%%%%%%%%%%%%%%%%%% OLD TEST
-\documentclass{article}
-\usepackage{fontspec,pdftexcmds}
-
-\input luatexja-core.sty
-
-\ExplSyntaxOn
-\xetex_or_luatex:nnn { \tl_set:Nn \l_fontspec_pre_feat_sclist }
- {
- \bool_if:NT \l_fontspec_icu_bool {
- \tl_if_empty:NF \l_fontspec_script_tl
- {
- script = \l_fontspec_script_tl ;
- language = \l_fontspec_lang_tl ;jfm=ujis;
- }
- }
- }
- {
- mode = \l_fontspec_mode_tl ;
- \tl_if_empty:NF \l_fontspec_script_tl
- {
- script = \l_fontspec_script_tl ;
- language = \l_fontspec_lang_tl ;jfm=ujis;
- }
- }
-\ExplSyntaxOff
-
-\newopentypefeature{Style}{OLDJIS}{+jp90}
-\newfontfamily\goth[BoldFont={ipaexg.ttf},Style=OLDJIS]{ipaexm.ttf}
+\newjfontfamily\ipajisninety[Scale=.95,CJKShape=JIS1990]{IPAexMincho}
-\begin{document}
-\makeatletter
-\def\extract@font{%
- \get@external@font
- \ifnum\pdf@strcmp{\f@encoding}{EU2}=0
- \expandafter\globaljfont\font@name\external@font\relax
- \font@name\global\zw=\zw\global\zh=\zh
- \else
- \global\expandafter\font\font@name\external@font\relax
- \font@name
- \fi
- \ifnum\pdf@strcmp{\f@encoding}{EU2}=0%
- \ltjglobalsetparameter{kanjiskip={0pt plus 0.4pt minus 0.4pt},
- xkanjiskip={0.25\zw plus 0.083333\zw minus 0.083333\zw}}%
- \fi
- \csname \f@encoding+\f@family\endcsname
- \csname\curr@fontshape\endcsname
- }
-% ! The font "ipaexg.ttf/I" cannot be found. というエラーが出る
-
-
-\goth abcdfghjfgあいう辻)\textbf{\unkern(辻あ{\Large あ}いう}
-
-\goth abcdfghjfgあいう辻)\textbf{(辻あ{\Large あ}いう}
-% \unkern がないとうなくいかない
-
-\tracingonline=1\scrollmode\showboxdepth=10000\showboxbreadth=10000\showlists
-\end{document}
+通常:「あいうえお」、(かきくけこ)。{\bf 太字}
+
+{\jfontspec[Scale=.95,JFM=mono]{IPAexMincho}
+\noindent 等幅:「あいうえお」、(かきくけこ)。{\bf 太字}
+}
+
+\subsection{JIS2004}
+逢芦飴溢茨鰯淫迂厩噂餌襖迦牙廻恢晦蟹葛鞄釜翰翫徽
+祇汲灸笈卿饗僅喰櫛屑粂祁隙倦捲牽鍵諺巷梗膏鵠甑叉
+榊薩鯖錆鮫餐杓灼酋楯薯藷哨鞘杖蝕訊逗摺撰煎煽穿箭
+詮噌遡揃遜腿蛸辿樽歎註瀦捗槌鎚辻挺鄭擢溺兎堵屠賭
+瀞遁謎灘楢禰牌這秤駁箸叛挽誹樋稗逼謬豹廟瀕斧蔽瞥
+蔑篇娩鞭庖蓬鱒迄儲餅籾爺鑓愈猷漣煉簾榔屢冤叟咬嘲
+囀徘扁棘橙狡甕甦疼祟竈筵篝腱艘芒虔蜃蠅訝靄靱騙鴉
+
+\subsection{JIS1990}
+{\ipajisninety
+逢芦飴溢茨鰯淫迂厩噂餌襖迦牙廻恢晦蟹葛鞄釜翰翫徽
+祇汲灸笈卿饗僅喰櫛屑粂祁隙倦捲牽鍵諺巷梗膏鵠甑叉
+榊薩鯖錆鮫餐杓灼酋楯薯藷哨鞘杖蝕訊逗摺撰煎煽穿箭
+詮噌遡揃遜腿蛸辿樽歎註瀦捗槌鎚辻挺鄭擢溺兎堵屠賭
+瀞遁謎灘楢禰牌這秤駁箸叛挽誹樋稗逼謬豹廟瀕斧蔽瞥
+蔑篇娩鞭庖蓬鱒迄儲餅籾爺鑓愈猷漣煉簾榔屢冤叟咬嘲
+囀徘扁棘橙狡甕甦疼祟竈筵篝腱艘芒虔蜃蠅訝靄靱騙鴉
+}
+
+
+\end{document}
\ No newline at end of file