Note that there is no command named \verb+\setmonojfont+, since it is
-popular for Japanese fonts that nearly all Japanese glyphs have same widths.
-
+popular for Japanese fonts that nearly all Japanese glyphs have same
+widths. Also note that the kerning feature is set off by default in
+these 7~commands, since this feature and \textbf{JAglue} will clash (see
+\ref{para-kern}).
\section{Changing Parameters}
There are many parameters in \LuaTeX-ja. And due to the behavior of \LuaTeX,
so TrueType/OpenType fonts with features can be used for Japanese fonts:
\begin{LTXexample}
\jfont\tradgt={file:ipaexg.ttf:script=latn;%
- +trad;jfm=ujis} at 14pt
+ +trad;-kern;jfm=ujis} at 14pt
\tradgt{}当/体/医/区
\end{LTXexample}
this prefix, you can specify a font that has its name only and is not
related to any real font.
-Mainly, use of this \texttt{psft:}\ prefix is for using non-embedding `standard' Japanese fonts (Ryumin-Light and GothicBBB-Medium).
-歴史
+Mainly, use of this \texttt{psft:}\ prefix is for using non-embedding
+`standard' Japanese fonts (Ryumin-Light and GothicBBB-Medium). 歴史
-\paragraph{Features}
+\paragraph{JFM}
jfm, jfmvar
+\paragraph{Note: kern feature}\label{para-kern}
+Some fonts have information for inter-glyph spacing. However, this
+information is not well-compatible with \LuaTeX-ja. More concretely,
+this kerning space from this information are inserted \emph{before} the
+insertion process of \textbf{JAglue}, and this causes incorrect spacing
+between two characters when both a glue/kern from the data in the font
+and it from JFM are present.
+
+\begin{itemize}
+\item You should specify {\tt -kern} in
+{\tt\char92jfont} primitive, when you want to use other font features,
+ such as {\tt script=...}\,.
+\item If you want to use Japanese fonts in proportinal width, and use
+ information from this font, use \texttt{jfm-prop.lua} for its JFM, and ...
+
+TODO: kanjiskip?
+\end{itemize}
\subsection{Structure of JFM file}
--- /dev/null
+luatexja.jfont.define_jfm {
+ dir = 'yoko',
+ zw = 1.0, zh = 1.0,
+
+ [0] = {
+ align = 'left', left = 0.0, down = 0.0,
+ width = 'prop', height = 0.88, depth = 0.12, italic=0.0,
+ }
+}
\ No newline at end of file
\fontspec_update_featstr:n {jfm=##1}
}
}
+ \keys_define:nn {fontspec} { JFM-var .code:n = {
+ \fontspec_update_fontid:n {+jfmvar=##1}
+ \fontspec_update_featstr:n {jfmvar=##1}
+ }
+ }
\keys_define:nn {fontspec-preparse-external} { NoEmbed .code:n = {
\cs_set:Nn \fontspec_namewrap:n {psft:####1}
}
}
\tl_set:Nn \g_fontspec_encoding_tl {JY3}
\tl_set:Nx \g_fontspec_default_fontopts_tl
- {JFM=ujis,Scale=0.960444,\g_ltj_fontspec_default_fontopts_tl}
+ {JFM=ujis,Scale=0.960444,Kerning=Off,\g_ltj_fontspec_default_fontopts_tl}
\cs_set_eq:NN \DeclareFontFamily \DeclareKanjiFamily
\fontspec_select:nn{#1}{#2}
\group_end: