% The Computer Modern Cyrillic family of fonts (by N.Glonti)

let cmchar=message; % `|cmchar|' should precede each character

font_coding_scheme:="TeX Cyrillic text";
input cycoding;

mode_setup; font_setup;


input cyru;  % upper case (majuscules)
input cyrl;  % lower case (minuscules)
input cyrsymb; % three additional char

font_slant slant;
font_x_height x_height#;
if monospace: font_normal_space 9u#; % no stretching or shrinking
 font_quad 18u#;
 font_extra_space 9u#;
else: font_normal_space 6u#+2letter_fit#;
 font_normal_stretch 3u#; font_normal_shrink 2u#;
 font_quad 18u#+4letter_fit#;
 font_extra_space 2u#;


% k#:=.5u#; kk#:=.75u#; kkk#:=1.5u#; kkkk#:=-2u#;

 k#:=.25u#; kk#:=.5u#; kkk#:=0.75u#; kkkk#:=-1.25
u#;

%k#:=-.5u#; kk#:=-1.5u#; kkk#:=-2u#; % three degrees of kerning
%k#:=2u#; kk#:=u#; kkk#:=3u#; kkkk#:=-5u#;
 ligtable CYR_a:                             % a
                    CYR_ya kern -kk#,         % ya
                    CYR_u kern -kk#,         % u
                    CYR_de kern  k#,          % d
                    CYR_che kern -kk#;         % ch

 ligtable CYR_be:                             % b
                    CYR_ve kern -k#,        % ve
                    CYR_ghe kern -k#,        % ghe
                    CYR_ie kern  k#,         % e
                    CYR_zhe kern  -k#,         % zhe
                    CYR_i kern -k#,          % i
                    CYR_ka kern -k#,          % ka
                    CYR_em kern -k#,          % em
                    CYR_en kern -k#,          % en
                    CYR_pe kern -k#,          % pe
                    CYR_er kern -k#,          % er
%                   CYR_ef kern -k#,         % (was -kk# AS)  f
                    CYR_ha kern -k#,          % x
%                   CYR_o kern  -k#,         % o  (-kkkk -> -kkk AS)
                    CYR_es kern  -k#,         % s (-kkkk -> -kkk AS)
                    CYR_u kern -k#,         % u
                    CYR_soft_sign kern -k#,    % soft_sign
                    CYR_yeru kern -k#,        % yeru
                    CYR_shcha kern -k#,        % shcha
                    CYR_tse kern -k#;        % tse

 ligtable CYR_tse: CYR_sha: CYR_shcha:
          CYR_en: CYR_em: CYR_pe:
                    CYR_be kern -k#,          % be
                    CYR_o kern -k#,          % o
                    CYR_ie kern -k#,          % es
                    CYR_ef kern -k#,        % ef
                    CYR_es kern -k#,          % ie
                    CYR_de kern k#;          % d

 ligtable CYR_de:                             % d
                    CYR_be kern -kkk#,          % be
                    CYR_o kern -kkk#,          % o
                    CYR_ie kern -kkk#,          % es
                    CYR_ef kern -kk#,          % ef
                    CYR_es kern -kkk#,          % ie
                    CYR_de kern kk#;          % d

 ligtable CYR_ie:                             % e
                    CYR_be kern kkk#,         % b
                    CYR_de kern -kk#,         % d
%                    CYR_ie kern -k#,          % e
                    CYR_zhe kern -kk#,          % e
%                    CYR_ef kern -k#,          % f
                    CYR_ha kern -kk#,         % x
%                    CYR_o kern -k#,          % o
%                    CYR_es kern -k#,          % s
%                    CYR_te kern -k#,           % t
                    CYR_u kern -k#;          % u

 ligtable CYR_ef:                             % f
                    CYR_ie kern k#,          % e
                    CYR_ha kern -kk#,         % x
                    CYR_i kern -kk#,         % i
                    CYR_en kern -k#,          %
                    CYR_pe kern -k#,          %
                    CYR_er kern -k#,          %
                    CYR_o kern k#,          % o
                    CYR_es kern k#,          % s
                    CYR_te kern -k#;           % t

 ligtable CYR_ghe:                             % g
                    CYR_be kern -k#,           % b
                    CYR_ie kern -kkk#,           % e
                    CYR_o kern -kkk#,           % o
                    CYR_es kern -kkk#;           % s

 ligtable CYR_ha:                             % kh
                    CYR_ie kern -kk#,         % e
                    CYR_o kern -kk#,         % o
                    CYR_ef kern -kk#,          %
                    CYR_es kern -kk#;         % s

 ligtable CYR_ka:                             % k
                    CYR_ie kern -kk#,         % e
                    CYR_ef kern -kk#,         % f
                    CYR_o kern -kk#,         % o
                    CYR_es kern -kk#,         % s
                    CYR_u kern -k#;          % u

 ligtable CYR_el:                             % l
                    CYR_ie kern -kk#,         % e
                    CYR_ef kern -kk#,         % f
                    CYR_o kern -kk#,         % o
                    CYR_es kern -kk#;         % s

 ligtable CYR_o:                             % o
%                   CYR_be kern -k#,         % b  (was kkkk AS)
                    CYR_ve kern -kk#,         % ve
                    CYR_de kern -kkk#,         % de
%                   CYR_ie kern -k#,          % e (was kkkk AS)
                    CYR_ha kern -kk#,         % x
%                   CYR_o kern -k#,          % o (was kkkk AS)
%                   CYR_es kern -kk#,          % s (was kkkk AS)
                    CYR_em kern -kk#,          %
                    CYR_en kern -kk#,           %
                    CYR_pe kern -kk#,           %
                    CYR_i kern -kk#,           %
                    CYR_short_i kern -kk#,           %
                    CYR_ka kern -kk#,           %
                    CYR_er kern -kk#,           %
                    CYR_sha kern -kk#,           %
                    CYR_shcha kern -kk#,           %
                    CYR_che kern -kkk#,           %
                    CYR_zhe kern -kk#;         % zh

 ligtable CYR_er:                             % p
%                   CYR_be kern -k#,         % b (kkkk -> -kkk AS)
%                   CYR_ie kern -k#,          % e(kkkk -> -kkk AS)
                    CYR_ha kern -kk#,         % x
%                   CYR_o kern -k#,          % o (kkkk -> -kkk AS)
%                   CYR_es kern -kk#,          % s (kkkk -> -kkk AS)
                    CYR_te kern -k#;           % t

%ligtable CYR_es:                             % s
%                   CYR_be kern -k#,           % b
%                   CYR_ie kern -k#,           % e
%                   CYR_ef kern -k#,           % f
%                   CYR_o kern -k#,           % o
%                   CYR_es kern -k#;           % s
 ligtable CYR_te:                             % t
                    CYR_en kern -k#,           %
                    CYR_es kern -k#,           %
                    CYR_ie kern -k#,           % e
                    CYR_o kern -k#;           % o
 ligtable CYR_u:                             % u
                    CYR_de kern -k#,         % d
                    CYR_el kern -kk#,           %
                    CYR_a kern -k#;         % s
 ligtable CYR_zhe:                             % zh
                   CYR_be kern -kk#,          % b
                   CYR_ie kern -kk#,          %
                   CYR_ef kern -kk#,          %
                   CYR_o kern -kk#,          % o
                   CYR_es kern -kk#;          % s

 ligtable CYR_ve:                             % w
                    CYR_te kern -k#;          % d

%ligtable CYR_ze:                             % z
%                   CYR_be kern -k#,          % b
%                   CYR_ie kern -k#,          % e
%                   CYR_o kern -k#,          % o
%                   CYR_es kern -k#;          % s

 ligtable CYR_A:                             % A
                    CYR_u kern -kk#,           %
                    CYR_CHE kern -kkk#;        % ch

 ligtable CYR_BE:                             % B
                    CYR_O kern -k#,           % o
                    CYR_ES kern -k#,           % s
                    CYR_U kern -kk#;           % u

 ligtable CYR_GHE: CYR_U:                   % G   U
                    CYR_A kern -kk#,        % a
%                    CYR_ve kern -kk#,        % w
%                    CYR_GHE kern -kk#,        % g
                    CYR_DE kern -kk#,        % d
%                    CYR_IE kern -kk#,        % e
                    CYR_EF kern -kk#,          % f
                    CYR_HA kern -kk#,        % kh
%                    CYR_I kern -kk#,        % i
%                    CYR_SHORT_I kern -kk#,        % j
%                    CYR_KA kern -kk#,        % k
                    CYR_EL kern -kk#,        % l
%                    CYR_EM kern -kk#,        % m
%                    CYR_EN kern -kk#,        % n
%                    CYR_O kern -kk#,        % o
%                    CYR_PE kern -kk#,        % p
                    CYR_YA kern -kk#,        % ya
%                    CYR_ER kern -kk#,        % r
                    CYR_ES kern -kk#,        % s
                    CYR_TE kern -kk#,        % t
                    CYR_U kern -kk#;        % u
%                    CYR_VE kern -kk#,        % w
%                    CYR_SOFT_SIGN kern -kk#,        % '
%                    CYR_YERU kern -kk#,        % y
%                    CYR_ZE kern -kk#,        % z
%                    CYR_SHA kern -kk#,        % sh
%                    CYR_SHCHA kern -kk#,        % shch
%                    CYR_CHE kern -kk#;        % ch
%                    CYR_HARD_SIGN kern -k#;        % ''

 ligtable CYR_O: CYR_ES: CYR_EF:
                    CYR_de kern -kkk#,           %
                    CYR_A kern -kkk#,        %
                    CYR_VE kern -kkk#,        %
                    CYR_GHE kern -kkk#,        %
                    CYR_ER kern -kkk#,        %
                    CYR_PE kern -kkk#,        %
                    CYR_EN kern -kkk#,          %
                    CYR_E kern -kkk#,          %
                    CYR_HA kern -kkk#,        %
                    CYR_I kern -kkk#,        %
                    CYR_KA kern -kkk#,        %
                    CYR_EM kern -kkk#,          %
                    CYR_SHA kern -kkk#,        %
                    CYR_SHCHA kern -kkk#,        %
                    CYR_SHORT_I kern -kkk#;       % j

 ligtable CYR_EN: CYR_EM: CYR_ER: CYR_PE:
          CYR_ZHE: CYR_KA: CYR_DE: CYR_HA:
                    CYR_O kern -kkk#,        %
                    CYR_ES kern -kkk#,        %
                    CYR_EF kern -kkk#;        %

 ligtable CYR_TE:                             % T
                    CYR_A kern -kkk#,        % a
%                   CYR_VE kern -kkk#,        % w
%                   CYR_GHE kern -kkk#,        % g
                    CYR_DE kern -kkk#,        % d
                    CYR_IE kern -kkk#,        % e
                    CYR_EF kern -kkk#,          % f
                    CYR_HA kern -kkk#,        % kh
                    CYR_I kern -kkk#,        % i
                    CYR_SHORT_I kern -kkk#,        % j
                    CYR_KA kern -kkk#,        % k
                    CYR_EL kern -kkk#,        % l
%                   CYR_EM kern -kkk#,        % m
%                   CYR_EN kern -kkk#,        % n
                    CYR_O kern -kkk#,        % o
%                   CYR_PE kern -kkk#,        % p
                    CYR_YA kern -kkk#,        % ya
%                   CYR_ER kern -kkk#,        % r
                    CYR_ES kern -kkk#,        % s
                    CYR_TE kern -kkk#,        % t
                    CYR_U kern -kkk#,        % u
%                   CYR_VE kern -kkk#,        %
%                   CYR_SOFT_SIGN kern -kkk#,        %
%                   CYR_YERU kern -kkk#,        % y
                    CYR_ZE kern -kkk#;       % z
%                   CYR_SHA kern -kk#,        % sh
%                   CYR_SHCHA kern -kk#,        % shch
%                   CYR_CHE kern -kk#,        % ch
%                    CYR_HARD_SIGN kern -kk#;        %
fi;
bye.

