% Copyright 2003-2005 Han The Thanh <hanthethanh@gmx.net>.
% This file is part of vntex.  License: LPPL, version 1.3 or newer,
% according to http://www.latex-project.org/lppl.txt

% ligatures and kerns for smallcap fonts

ligtable
    "-":  "-" =: oct"025",
     oct"177" =: oct"177"; % <hyphen><hyphenchar> => <hyphenchar>
ligtable
    oct"025": "-"=:oct"026";  % "---"  => emdash

ligtable "<": "<" =: oct"023";     % "<<"
ligtable ">": ">" =: oct"024";     % ">>"
ligtable ",": "," =: oct"022";     % ",,"

ligtable
    "`":  "`"=:oct"020",
          oct"020" kern 2u#,
          "?" kern 2u#,
          "!" kern 2u#;

ligtable
    "'":  "'"=:oct"021",
          oct"021" kern 2u#,
          "?" kern 2u#,
          "!" kern 2u#;

 k#:=-.5u#; ku#:=-1.0u#; kk#:=-1.5u#; kkk#:=-2u#; % four degrees of kerning

ligtable boundarychar:
   oct"020" kern -kk#, oct"021" kern -kk#, oct"022" kern -kk#,
   oct"055" kern -kk#, oct"140" kern -kk#, oct"047" kern -kk#;

ligtable oct"022":
   oct"015" kern 2u#, "," kern 2u#,
         oct"015":
   oct"022" kern 2u#,
   y_fam(kern ku#,) 
   "v" kern ku#, "w" kern k#, "V" kern kkk#, "W" kern kk#, Y_fam(kern kk#,)
   
   O_fam(kern k#,) lig_CGQ_table(k#),
   boundarychar kern -kk#;

ligtable oct"020":
   oct"140" kern 2u#, oct"020" kern 2u#, boundarychar kern -kk#;

ligtable oct"021":
   oct"047" kern 2u#, oct"021" kern 2u#, boundarychar kern -kk#;

ligtable oct"024": % ">>"
   "." kern kk#, "," kern kk#;

 ligtable
        "P":
        "T":
        Y_fam(:)    a_fam(kern kk#,)
                A_fam(kern kk#,)
                end_ligtable;
 ligtable
        "F":
        "V":
        "W":
                if serifs:
                a_fam(kern kkk#,)
                A_fam(kern kkk#,)
                else:
                a_fam(kern kk#,)
                A_fam(kern kk#,)
                fi
        "K":
        "X":    o_fam(kern k#,)
                O_fam(kern k#,)
                "c" kern k#,
                lig_CGQ_table(k#),
                "g" kern k#, 
                "q" kern k#;
 ligtable
        O_fam(:)
        D_fam(:)    "x" kern k#,
                "X" kern k#,
                "w" kern k#,
                "W" kern k#,
                a_fam(kern k#,)
                A_fam(kern k#,)
                y_fam(kern k#,) 
                Y_fam(kern k#,)
                "v" kern k#,
                "V" kern k#;
 ligtable
        A_fam(:)
                if serifs:
                "R":
                fi
                "c" kern k#,
                lig_CGQ_table(k#),
                o_fam(kern k#,)
                O_fam(kern k#,)
                "g" kern k#,  
                u_fam(kern k#,)
                U_fam(kern k#,)
                "q" kern k#,
        "L":
                "T" kern kk#, 
                "t" kern kk#, 
                Y_fam(kern kk#,) 
                y_fam(kern kk#,) 
                "V" kern kkk#,
                "v" kern kkk#,
                "W" kern kkk#,
                "w" kern kkk#;
 ligtable
        "I":    "I" kern -k#; % Richard III

 k#:=-.5u#; kk#:=-1.5u#; kkk#:=-2u#; % three degrees of kerning

 ligtable
        "p":
        "t":
        y_fam(:)    a_fam(kern kk#,)
                    end_ligtable;
 ligtable
        "f":
        "v":
        "w":
                if serifs:
                a_fam(kern kkk#,)
                else:
                a_fam(kern kk#,)
                fi
        "k":
        "x":    o_fam(kern k#,)
                "c" kern k#,
                "g" kern k#, 
                "q" kern k#;
 ligtable
        o_fam(:)
        d_fam(:)    "x" kern k#,
                "w" kern k#,
                a_fam(kern k#,)
                y_fam(kern k#,)
                "v" kern k#;
 ligtable
        a_fam(:)
                if serifs: "r": fi
                "c" kern k#,
                o_fam(kern k#,)
                "g" kern k#, 
                u_fam(kern k#,)
                "q" kern k#,
        "l":    "'" kern kk#,
                "t" kern kk#,  
                y_fam(kern kk#,)  
                "v" kern kkk#,
                "w" kern kkk#;
 ligtable
        "i":    "i" kern -k#; % skiing

endinput;
