feature hlig {
    sub s t  by s_t;
    sub c t  by c_t;
} hlig;

lookup liga_f {
    ignore sub f._f [ f f.DEU]' [ f f.DEU]; # never ever produce a fff-ligature!
    ignore sub longs._longs longs' longs;   # never ever prouce a triple-longs-ligature!
#    ignore sub f._f f.DEU' l ;     # the sequence ffl almost always needs manual interaction!
    ignore sub [ f f.DEU longs ]' uni200C;
    ignore sub uni200C t';
    sub [ f f.DEU ]' [ f f.DEU ] by f._f;
    sub [ f f.DEU ] t' by t.f_;
    sub [ f f.DEU longs ]' i by [ f._i f._i longs._i ];
    sub [ f longs ]' j by [ f._i longs._i ];
    sub [ f.DEU ]' j o r d by f._i;     #german -fjord with ligature
    sub [ f.DEU ]' j e l l by f._i;     #german -fjell with ligature
    sub f.DEU' l by f._asc;
    sub [ f._i longs._i ] [ i j ]' by [ i.dotless j.dotless ];
    sub [ f longs ]' @asc_f by [ f._asc longs._asc ];
    sub [K k] a [ f.DEU ]' k a by f._asc;  # kafkaeske Ligatur
    sub [ f._asc longs._asc ] @asc_f' by @asc_f1;
    sub longs' longs by longs._longs;
    sub [ f f.DEU ]'  [ @abovediacritics @abovediac_flat @belowdiacritics ]  [ f f.DEU ] by f._f;
    sub [ f f.DEU ]  [ @abovediacritics @abovediac_flat @belowdiacritics ]  t' by t.f_;
    sub [ f f.DEU longs ]'  [ @abovediacritics @abovediac_flat @belowdiacritics ]  [ i j ] by [ f._i f._i longs._i ];
    sub f.DEU'  [ @abovediacritics @abovediac_flat @belowdiacritics ]  l by f._asc;
    sub [ f._i longs._i ]  [ @abovediacritics @abovediac_flat @belowdiacritics ]  [ i j ]' by [ i.dotless j.dotless ];
    sub [ f longs ]'  [ @abovediacritics @abovediac_flat @belowdiacritics ]  @asc_f by [ f._asc longs._asc ];
    sub [ f._asc longs._asc ]  [ @abovediacritics @abovediac_flat @belowdiacritics ]  @asc_f' by @asc_f1;
    sub longs'  [ @abovediacritics @abovediac_flat @belowdiacritics ]  longs by longs._longs;
} liga_f;


lookup liga_standard {
#    sub [ f f.DEU ] i  by f_i;
#    sub [ f f.DEU ] [ f f.DEU ] i  by f_f_i;
#    sub longs i  by longs_i;
#    sub f f by f_f;
#    sub f.DEU f.DEU by f_f;
#    sub [f f.DEU] l  by f_l;
#    sub [f f.DEU] [f f.DEU] l  by f_f_l;
#    sub f h  by f_h;
#    sub f k  by f_k;
#    sub f b  by f_b;
#    sub f j  by f_j;
#    sub f f h  by f_f_h;
#    sub f f k  by f_f_k;
#    sub f f b  by f_f_b;
#    sub f f j  by f_f_j;
    sub longs t  by longs_t;
#    sub longs longs l  by longs_longs_l;
#    sub longs longs i  by longs_longs_i;
#    sub longs longs  by longs_longs;
#    sub longs l  by longs_l;
#    sub T h  by T_h;
#    sub c h  by c_h;
#    sub c k  by c_k;
#    sub longs s  by longs_s;
#    sub [ f f.DEU ] t  by f_t;
#    sub [ f f.DEU ] [f f.DEU] t  by f_f_t;
#    sub longs j  by longs_j;
#    sub longs b  by longs_b;
#    sub longs h  by longs_h;
#    sub longs k  by longs_k;
#    sub longs longs j  by longs_longs_j;
#    sub longs longs b  by longs_longs_b;
#    sub longs longs h  by longs_longs_h;
#    sub longs longs k  by longs_longs_k;
    sub longs longs t  by longs_longs_t;
#    sub L.CAT periodcentered by Ldot;
#    sub l.CAT periodcentered by ldot;
#    sub L.CATsc periodcentered by Ldot.sc;
#    sub l.CATsc periodcentered by ldot.sc;
    sub Q y by Q_y;
    sub q uniA76B by q_uniA76B;
} liga_standard;

lookup liga_regionals {
    sub u1F1E8 u1F1F3 by u1F1E8_u1F1F3; #CN
    sub u1F1EA u1F1F8 by u1F1EA_u1F1F8; #ES
    sub u1F1EB u1F1F7 by u1F1EB_u1F1F7; #FR
    sub u1F1EC u1F1E7 by u1F1EC_u1F1E7; #GB
    sub u1F1F3 u1F1F4 by u1F1F3_u1F1F4; #NO
} liga_regionals;

feature liga {
    lookup liga_f;
    lookup liga_standard;
    lookup liga_regionals;
} liga;

lookup Th_lig {
    sub T h  by T_h;
} Th_lig;

feature dlig {
    lookup Th_lig;
} dlig;
