% ---------------------------------------------------------------------------
% This is POLAN.MF ({\bif{}polska antykwa}, i.e., roman) in text format.
% The program is a modification of the ROMAN.MF file.
% ---------------------------------------------------------------------------
% PL VERSION 1.09, April 13th, 2001 -- released for BachoTeX 2001
% ---------------------------------------------------------------------------
% AUTHORS OF MODIFICATION: {\bif{}Bogus\l{}aw Jackowski \& Marek Ry\'cko}
% ---------------------------------------------------------------------------
% This file belongs to the public domain under conditions similar to
% those of D. E. Knuth specified for the Computer Modern family of fonts.
% 
% For details see either the file MEXINFO.POL or MEXINFO.ENG.
% ---------------------------------------------------------------------------


% ---------------------------------------------------------------------------
if ligs>1: font_coding_scheme:="TeX text";
 spanish_shriek=oct"074"; spanish_query=oct"076";
else: font_coding_scheme:=if ligs=0: "TeX typewriter text"
  else: "TeX text without f-ligatures" fi;
 spanish_shriek=oct"016"; spanish_query=oct"017"; fi

mode_setup; font_setup;

input pl_dod;  % Polish additional definitions
input pl_dl;   % Polish majuscules
input pl_ml;   % Polish minuscules
input pl_cud;  % Polish and French quotation marks

input romanu;  % upper case (majuscules)
input romanl;  % lower case (minuscules)
input greeku;  % upper case Greek letters
input romand;  % numerals
input romanp;  % ampersand, question marks, currency sign
input romspl;  % lowercase specials (dotless \i, ligature \ae, etc.)
input romspu;  % uppercase specials (\AE, \OE, \O)
input punct;   % punctuation symbols common to roman and italic text
input accent;  % accents common to roman and italic text

if ligs>1:  input romlig; fi  % letter ligatures
if ligs>0:  input comlig; fi  % ligatures common with italic text
if ligs<=1: input romsub; fi  % substitutes for ligatures

ligtable "!": "`" =: spanish_shriek;
ligtable "?": "`" =: spanish_query;

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#;

% IMPLICIT KERNS:

% three degrees of kerning (more precisely, |-u#| is fourth):
k#:=-.5u#; kk#:=-1.5u#; kkk#:=-2u#;

% Usually a kern for a latin letter is repeated for the corresponding
% diacritical one, except that no kerns after accented |"c"| are inserted,
% and that some kerns after accented |"n"| and |"a"| with ogonek
% are not inserted; the following kerns have been added:
%  - between |"a"| with ogonek and |"g"|, |"p"|
%  - between Polish crossed |"l"| and |"'"|
%  - between sansserif Polish crossed |"l"| and some minuscules
%  - between Polish opening quotes and some letters
% the following kerns should have been added:
%  - between |"."| and |"."| (...)
%  - between |"A"| and |"v"| (Average)
%  - between |"A"| and |"w"| (Awkward or Lem's Awruk)
%  - between |"F"|, |"P"|, |"T"|, |"V"|, |"W"|, |"Y"| and |"."|, |","|
% but for the sake of compatibility with CM's they would have been
% inserted only if |improve_kerns=true| (by default |improve_kerns=false|).

if improve_kerns: ligtable ".": "." kern -kkk#; fi
ligtable "k":
 if serifs: "v": "a" kern -u#, ogonked_a kern -u#, fi
 "w": "e" kern k#, ogonked_e kern k#, "a" kern k#, ogonked_a kern k#,
 "o" kern k#, accented_o kern k#, "c" kern k#, accented_c kern k#;
ligtable "P":
 if improve_kerns: "." kern k#, "," kern k#, fi
 "A" kern kk#, ogonked_A kern kk#, "y":
 "o" kern k#, accented_o kern k#, "e" kern k#, ogonked_e kern k#,
 "a" kern k#, ogonked_a kern k#, "." kern kk#, "," kern kk#;
ligtable "F": "V": "W":
 if improve_kerns: "." kern -u#, "," kern -u#, fi
 if serifs:
  "o" kern kk#, accented_o kern kk#, "e" kern kk#, ogonked_e kern kk#,
  "u" kern kk#, "r" kern kk#, "a" kern kk#, ogonked_a kern kk#,
  "A" kern kkk#, ogonked_A kern kkk#,
 else:
  "o" kern k#, accented_o kern k#, "e" kern k#, ogonked_e kern k#,
  "u" kern k#, "r" kern k#, "a" kern k#, ogonked_a kern k#, "A" kern kk#,
  ogonked_A kern kk#,
 fi
 "K": "X": "O" kern k#, accented_O kern k#, "C" kern k#, accented_C kern k#,
 "G" kern k#, "Q" kern k#;
ligtable "T":
 "y" kern if serifs: k# else: kk# fi, "Y": "e" kern kk#, ogonked_e kern kk#,
 "o" kern kk#, accented_o kern kk#, "r" kern kk#,
 "a" kern kk#, ogonked_a kern kk#, "A" kern kk#, ogonked_A kern kk#,
 "u" kern kk# if improve_kerns:, "." kern k#, "," kern k# fi;
ligtable "O": accented_O: "D":
 "X" kern k#, "W" kern k#, "A" kern k#, ogonked_A kern k#,
 "V" kern k#, "Y" kern k#;
if serifs:
 ligtable "h": "m": "n":
  "t" kern k#, "b" kern k#,
  accented_n: "u" kern k#, "y" kern k#, "v" kern k#, "w" kern k#;
 ligtable "c": "h" kern k#, "k" kern k#;
fi
ligtable "o": accented_o: "b": "p":
 "e" kern -k#, ogonked_e kern -k#, "o" kern -k#, accented_o kern -k#,
 "x" kern k#, "d" kern -k#, "c" kern -k#, accented_c kern -k#, "q" kern -k#,
 "a": if serifs: "v" kern k#, "j" kern u#, else: "r" kern k#, fi
 "t": "y" kern k#, "u": "w" kern k#;

ligtable "A":
 if improve_kerns:
  "v" kern if serifs: kkk# else: k# fi, "w" kern if serifs: kk# else: k# fi,
 fi
 ogonked_A: if serifs: "R": fi "t" kern k#, "C" kern k#, accented_C kern k#,
 "O" kern k#, accented_O kern k#, "G" kern k#, "U" kern k#, "Q" kern k#,
 "L": crossed_L: "T" kern kk#, "Y" kern kk#, "V" kern kkk#, "W" kern kkk#;
ligtable "g": "j" kern -k#; % logjam
ligtable "I": "I" kern -k#; % Richard III

ligtable ogonked_a:
 if serifs: "g" kern -k# , "p" kern -k#, fi\\ "w" kern k#;
ligtable crossed_l: "'" kern -k#
 if not serifs: ,
  "a" kern k#, ogonked_a kern k#, "c" kern k#, accented_c kern k#,
  "d" kern k#, "e" kern k#, ogonked_e kern k#, "g" kern k#,
  "o" kern k#, accented_o kern k#, "s" kern k#, accented_s kern k#
 fi;
ligtable polish_opening_quotes:
 "g" kern -k#, "j" kern -kkk#, "p" kern -k#, "y" kern u#,
 "v" kern k#, "w" kern k#,
 if serifs:
  "A" kern u#, ogonked_A kern u#,
  "C" kern u#, accented_C kern u#, "D" kern u#,
  "E" kern u#, ogonked_E kern u#, "F" kern u#, "H" kern u#,
  "I" kern u#, "J" kern u#, "K" kern u#, "L" kern u#, crossed_L kern u#,
  "M" kern u#, "N" kern u#, accented_N kern u#, "P" kern u#,
  "R" kern u#, "S" kern u#, accented_S kern u#, "T" kern k#, "X" kern u#,
  "Y" kern k#, "Z" kern u#, accented_Z kern u#, dotted_Z kern u#,
 else:
  "T" kern kk#, "Y" kern kk#,
 fi
 "V" kern kk#, "W" kern k#;

fi

% There are also ligature/kern programs for |"f"| in the ROMLIG file,
% for |"-"|, |"`"|, and |"'"| in the COMLIG file,
% and for  |"<"|, |">"|, |","| in the PL_CUD file.

bye.
%%\end
