%% Based on lsmisc.mtx
%% See that file for commentary.

\relax

\metrics

\needsfontinstversion{1.917}

\ProvidesMtxPackage{dotscmisc}

\ifisglyph{i.sc}\then
   \setglyph{dotlessi.sc}
      \glyph{i.sc}{1000}
      \setleftrightkerning{dotlessi.sc}{i.sc}{1000}
   \endsetglyph
\Fi

\ifisglyph{j.sc}\then
   \setglyph{dotlessj.sc}
      \glyph{j.sc}{1000}
      \setleftrightkerning{dotlessj.sc}{j.sc}{1000}
   \endsetglyph
\Fi


\setint{smallcapsspacing}{0}

\ifisglyph{f.sc}\then 

\setglyph{ff.sc}
   \glyph{f.sc}{1000}
   \movert{\add{\kerning{f.sc}{f.sc}}{\int{smallcapsspacing}}}
   \glyph{f.sc}{1000}
\endsetglyph
\setrightkerning{ff.sc}{f.sc}{1000}
\setglyph{f_f.sc}
	\glyph{ff.sc}{1000}
\endsetglyph
\setrightkerning{f_f.sc}{ff.sc}{1000}

\ifisglyph{i.sc}\then
   \setglyph{fi.sc}
      \glyph{f.sc}{1000}
      \movert{\add{\kerning{f.sc}{i.sc}}{\int{smallcapsspacing}}}
      \glyph{i.sc}{1000}
   \endsetglyph
   
%    \setleftkerning{fi.sc}{f.sc}{1000}
   \setrightkerning{fi.sc}{i.sc}{1000}

   \setglyph{f_i.sc}
	\glyph{fi.sc}{1000}
   \endsetglyph
   \setrightkerning{f_i.sc}{fi.sc}{1000}

   \setglyph{ffi.sc}
      \glyph{ff.sc}{1000}
      \movert{\add{\kerning{f.sc}{i.sc}}{\int{smallcapsspacing}}}
      \glyph{i.sc}{1000}
   \endsetglyph

   \setglyph{f_f_i.sc}
	\glyph{ffi.sc}{1000}
   \endsetglyph
   \setrightkerning{f_f_i.sc}{ffi.sc}{1000}

%    \setleftkerning{ffi.sc}{f.sc}{1000}
   \setrightkerning{ffi.sc}{i.sc}{1000}
\fi

\ifisglyph{l.sc}\then
   \setglyph{fl.sc}
      \glyph{f.sc}{1000}
      \movert{\add{\kerning{f.sc}{l.sc}}{\int{smallcapsspacing}}}
      \glyph{l.sc}{1000}
   \endsetglyph

%    \setleftkerning{fl.sc}{f.sc}{1000}
   \setrightkerning{fl.sc}{l.sc}{1000}

   \setglyph{f_l.sc}
	\glyph{fl.sc}{1000}
   \endsetglyph
   \setrightkerning{f_l.sc}{fl.sc}{1000}

   \setglyph{ffl.sc}
      \glyph{ff.sc}{1000}
      \movert{\add{\kerning{f.sc}{l.sc}}{\int{smallcapsspacing}}}
      \glyph{l.sc}{1000}
   \endsetglyph

%    \setleftkerning{ffl.sc}{f.sc}{1000}
   \setrightkerning{ffl.sc}{l.sc}{1000}

   \setglyph{f_f_l.sc}
	\glyph{ffl.sc}{1000}
   \endsetglyph
   \setrightkerning{f_f_l.sc}{ffl.sc}{1000}

\fi
\fi % ifisglyph{f.sc}


\ifareglyphs{i.sc,j.sc}\then
   \setglyph{ij.sc}
      \glyph{i.sc}{1000}
      \movert{\add{\kerning{i.sc}{j.sc}}{\int{smallcapsspacing}}}
      \glyph{j.sc}{1000}
   \endsetglyph
%    \setleftkerning{ij.sc}{i.sc}{1000}
   \setrightkerning{ij.sc}{j.sc}{1000}
\fi

\ifisglyph{ss.sc}\then
	\setglyph{germandbls.sc}
		\glyph{ss.sc}{1000}
	\endsetglyph
	\setleftrightkerning{germandbls.sc}{ss.sc}{1000}
\Else
	\ifisglyph{s.sc}\then
   		\setglyph{germandbls.sc}
      			\glyph{s.sc}{1000}
      			\movert{\add{\kerning{s.sc}{s.sc}}{\int{smallcapsspacing}}}
      			\glyph{s.sc}{1000}
   		\endsetglyph
   		\setleftrightkerning{germandbls.sc}{s.sc}{1000}
	\Fi
\Fi

\endmetrics
