X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;f=doc%2Fluatexja.dtx;h=54ad48eba30370687189b5a6aad67a6935738e8a;hb=cf51a2259a27eeed9a3d5d0c40c767a5e6bc403e;hp=b8a6c4ff68a5fe5f47ceef8e3b703101a0e4113f;hpb=d9a015ea3a83f3d7dc6f534ce991607720ba7e2a;p=luatex-ja%2Fluatexja.git diff --git a/doc/luatexja.dtx b/doc/luatexja.dtx index b8a6c4f..54ad48e 100644 --- a/doc/luatexja.dtx +++ b/doc/luatexja.dtx @@ -1919,7 +1919,7 @@ so TrueType/OpenType fonts with features can be used for Japanese fonts: TrueType/OpenTypeフォントにfeatureを指定したものを和文フォントとして用いる ことができる: % -\begin{LTXexample}[width=0.4\textwidth] +\begin{LTXexample}[width=0.3\textwidth] \jfont\tradgt={file:KozMinPr6N-Regular.otf:script=latn;% +trad;-kern;jfm=ujis} at 14pt \tradgt 当/体/医/区 @@ -2011,7 +2011,7 @@ JFMの名前を指定する.もし以前に指定されたJFMが読み込ま \item[jfmvar=] 標準では,JFMとサイズが同じで, 実フォントだけが異なる2つの和文フォントは…… % -\begin{LTXexample}[width=0.4\textwidth] +\begin{LTXexample}[width=0.3\textwidth] \ltjsetparameter{differentjfm=both} \jfont\F=file:KozMinPr6N-Regular.otf:jfm=ujis \jfont\G=file:KozGoPr6N-Medium.otf:jfm=ujis @@ -2100,6 +2100,40 @@ TODO: kanjiskip? \end{itemize} +%<*ja> +\paragraph{\texttt{extend}と\texttt{slant}} +OpenType font featureと見かけ上同じような形式で指定できるものに, +\begin{description} +\item[\texttt{extend=}] 横方向に倍拡大する. +\item[\texttt{slant=}] に指定された割合だけ傾ける. +\end{description} +の2つがある. +\texttt{extend}や\texttt{slant}を指定した場合は,それに応じたJFMを指定すべきである% +\footnote{\LuaTeX-jaでは,これらに対するJFMを特に提供することはしない予定である.}. +例えば,次の例では無理やり通常のJFMを使っているために,文字間隔やイタリック補正量が +正しくない: +% +%<*en> +\paragraph{\texttt{extend} and \texttt{slant}} +The following setting can be specified as OpenType font features: +\begin{description} +\item[\texttt{extend=}] expand the font horizontally by . +\item[\texttt{slant=}] slant the font. +\end{description} +Note that \LuaTeX-ja doesn't adjust JFMs by these \texttt{extend} and \texttt{slant} +settings; you have to write new JFMs on purpose. +For example, the following example uses the standard JFM \texttt{jfm-ujis.lua}, hence +letter-spacing and the width of italic correction are not correct: +% +\begin{LTXexample}[width=0.3\textwidth] +\jfont\E=file:KozMinPr6N-Regular.otf:extend=1.5;jfm=ujis +\E あいうえお + +\jfont\S=file:KozMinPr6N-Regular.otf:slant=1;jfm=ujis +\S あいう\/ABC +\end{LTXexample} + + %\subsection{Prefix \texttt{psft}} %\subsection{\texttt{psft}プリフィックス} \label{ssec-psft} @@ -2110,9 +2144,12 @@ to specify a `name-only' Japanese font which will not be embedded to PDF. Typical use of this prefix is to specify the `standard' Japanese fonts, namely, `Ryumin-Light' and `GothicBBB-Medium'. + \emph{OpenType font features, such as `{\tt +jp90}', have no meaning in `name-only' fonts using this `{\tt psft:}'\ prefix. This is because we can't expect what fonts are actually used by the PDF reader.} +Note that \texttt{extend}~and~\texttt{slant} settings (see~above) are supported +with \texttt{psft} prefix, because they are only simple linear transformations. % %<*ja> \texttt{file:} と \texttt{name:} のプリフィックスに加えて, @@ -2121,8 +2158,13 @@ This is because we can't expect what fonts are actually used by the PDF reader.} このプリフィックスを用いることで,PDFには埋め込まれない「名前だけの」 和文フォントを指定することができる.「標準的な」和文フォント, つまり`Ryumin-Light'と`GothicBBB-Medium'の指定でこのプリフィックスが使われる. -\textbf{非埋込フォントをPDFに使用すると,実際にどのようなフォントが表示に用いられるか予測できない. -本プリフィックス指定時には,\texttt{+jp90} などのOpenType font featureの効力はない.} + +\textbf{\texttt{psft}プリフィックスの下では +\texttt{+jp90} などのOpenType font featureの効力はない. +非埋込フォントをPDFに使用すると,実際にどのようなフォントが +表示に用いられるか予測できないからである.} +\texttt{extend}と\texttt{slant}指定は単なる変形のため +\texttt{psft}プリフィックスでも使用可能である. % %\paragraph{\texttt{cid} key} @@ -2191,38 +2233,6 @@ Please contact the LuaTeX-ja project team. ? \end{lstlisting} -%<*ja> -\paragraph{\texttt{extend}と\texttt{slant}} -OpenType font featureと見かけ上同じような形式で指定できるものに, -\begin{description} -\item[\texttt{extend=}] 横方向に倍拡大する. -\item[\texttt{slant=}] に指定された割合だけ傾ける. -\end{description} -の2つがあり,これらだけは\texttt{psft}プリフィックスでも使用可能にしている. -\texttt{extend}や\texttt{slant}を指定した場合は,それに応じたJFMを指定すべきである% -\footnote{\LuaTeX-jaでは,これらに対するJFMを特に提供することはしない予定である.}. -例えば,次の例では無理やり通常のJFMを使っているために,文字間隔やイタリック補正量が -正しくない: -\begin{LTXexample}[width=0.3\textwidth] -\jfont\E=psft:Ryumin-Light:extend=1.5;jfm=ujis -\E あいうえお - -\jfont\S=psft:Ryumin-Light:slant=1;jfm=ujis -\S あいう\/ABC -\end{LTXexample} -% -%<*en> -\paragraph{\texttt{extend} and \texttt{slant}} -The following setting can be specified as OpenType font features: -\begin{description} -\item[\texttt{extend=}] expand the font horizontally by . -\item[\texttt{slant=}] slant the font. -\end{description} -These two settings are also supported with \texttt{psft} prefix. -Note that \LuaTeX-ja doesn't adjust JFMs by these \texttt{extend} and \texttt{slant} -settings; you have to write new JFMs on purpose. -% - %\subsection{Structure of JFM file} %\subsection{JFMファイルの構造} @@ -3532,9 +3542,10 @@ As closing this subsection, we shall introduce an example of 紹介しておこう.\verb+\userelfont+ の使用によって,「abc」の部分のフォントが Avant Garde (OT1/pag/m/n) に変わっていることがわかる. % -\begin{LTXexample} -\kanjifamily{gt}\selectfont あいうxyz -\SetRelationFont{JY3}{gt}{m}{n}{OT1}{pag}{m}{n} +\begin{LTXexample}[width=0.3\textwidth] +\makeatletter +\SetRelationFont{JY3}{\k@family}{m}{n}{OT1}{pag}{m}{n} + % \k@family: current Japanese font family \userelfont\selectfont あいうabc \end{LTXexample}