\DeclareFontEncoding{JP}{}{}
\mlfontencoding{jp}{JP}
\DeclareFontSubstitution{JP}{dn}{m}{n}
\begingroup
\nfss@catcodes
\input{jpdn.fd}
\endgroup
\DeclareErrorMLFont{jp}{JP}{dn}{m}{n}{10}
\newcommand\jprmdefault{dn}
\newcommand\jpsfdefault{dn}
\newcommand\jpttdefault{dn}
\newcommand\jpbfdefault{bx}
\newcommand\jpmddefault{m}
\newcommand\jpitdefault{n}
\newcommand\jpsldefault{n}
\newcommand\jpscdefault{n}
\newcommand\jpupdefault{n}
\newcommand\jpencodingdefault{JP}
\newcommand\jpfamilydefault{\jprmdefault}
\newcommand\jpseriesdefault{\jpmddefault}
\newcommand\jpshapedefault{\jpupdefault}

% compatibility with JLaTeX
\newcommand{\dm}{\protect\pdm}
\newcommand{\pdm}{\jpfontseries\jpmddefault\selectfont}
\newcommand{\dg}{\protect\pdg}
\newcommand{\pdg}{\jpfontseries\jpbfdefault\selectfont}
\let\@min\min
\renewcommand{\min}{\protect\pmin}
\newcommand{\pmin}{\ifmmode\@min\else\pdm\fi}
\let\goth\dg
