## Latin ##
@first_A   = [ A uni0245 ];
@first_A_topacc = [ Agrave Aacute Acircumflex Atilde Adieresis Aring Amacron Abreve ];
@first_A_botacc = [ Aogonek ];
@first_asc = [ A.sc a.sc ];
@first_E = [ E Eacute Egrave Edieresis uni1EBC Eogonek Ecircumflex Emacron Ebreve Edotaccent Ecaron ];
@first_F = [ F ];
@first_L = [ L ];
@first_M = [ M ];
@first_O = [ O ];
@first_T = [ T ];
@first_V = [ V W Y ];
@first_vsc = [ V.sc v.sc W.sc w.sc ];
@first_f = [ f f_f f.long f.DEU f_f.long ];
@first_m = [ h m n ];
@first_o = [ ae b c e o oe p thorn ];
@first_v = [ v w y ];

@first_halfring   = [ uni02BE uni02BF ];

@second_A   = @first_A;
@second_A_topacc = @first_A_topacc;
@second_A_botacc = @first_A_botacc;
@second_asc = @first_asc;
@second_O = [ C G O Ohorn Q Q.long ];
@second_V = [ V W Y ];
@second_vsc = [ V.sc v.sc W.sc w.sc ];
@second_b = [ b h k l thorn ];
@second_o = [ a ae aogonek c ccedilla d e eogonek g o uni01EB oe q s scedilla eth ];
@second_m = [ m n p r u uogonek z dotlessi ];
@second_t = [ t ];
@second_v = [ v w x y ];
@second_i = [ i j agrave aacute adieresis atilde ];

@second_HighAscAfter_longf = [b h-l
	agrave acircumflex adieresis aring egrave edieresis igrave iacute icircumflex idieresis eth ograve ugrave thorn germandbls abreve ccaron ebreve ecaron gbreve uni0123 hcircumflex hbar itilde imacron ibreve iogonek dotlessi ij jcircumflex uni0137 lacute uni013C lcaron ldot lslash ncaron obreve rcaron scircumflex scaron ubreve ydieresis zcaron longs
	uni1E03 uni1E05 uni1E07 uni1E15 uni1E17 uni1E1D uni1E1F uni1E23 uni1E25 uni1E27 uni1E29 uni1E2B uni1E2D uni1E2F uni1E31 uni1E33 uni1E35 uni1E37 uni1E39 uni1E3B uni1E3D uni1E4F uni1E51 uni1E65 uni1E67 uni1E6B uni1E7B uni1E8D uni1E96 uni1E97 uni1E9A uni1E9B uni1E9C uni1E9D uni1E9F
	uni1EA3 uni1EA5 uni1EA6 uni1EA7 uni1EA8 uni1EA9 uni1EAB uni1EAD uni1EAF uni1EB1 uni1EB3 uni1EB5 uni1EB7 uni1EBB uni1EC1 uni1EC5 uni1EC9 uni1ECB uni1ECF uni1ED3 uni1ED7 uni1EDD uni1EDF uni1EE7 uni1EEB uni1EED uni1EF3 uni1EF7 uni1EFB
 	i.TRK
];

@second_halfring   = [ uni02BE uni02BF ];

@all_A = [ @first_A @first_A_topacc @first_A_botacc ];

lookup kern {
    pos @all_A     @second_v  -60;
    pos @all_A     @second_O  -40;
    pos @all_A     @second_V -100;
    pos @all_A @second_halfring -70;

    pos @first_asc @second_vsc -75;

#    pos @first_E   @second_m  -10;
#    pos @first_E   @second_o  -25;
    pos @first_E   @second_v  -20;
    pos @first_E   @second_t  -10;

    pos @first_F @second_m  -20;
    pos @first_F @second_o  -10;
    pos @first_F @second_v  -10;
    pos @first_F @second_t  -10;

    pos @first_L @second_v  -50;

    pos @first_M @second_t  -10;
    pos @first_M @second_v  -30;
    pos @first_M @second_o  -10;

    pos @first_O @all_A     -60;

    pos @first_T @second_m  -20;
    pos @first_T @second_o  -35;
    pos @first_T @second_v  -10;

    pos @first_V @all_A    -100;
    pos @first_V @second_o  -30;

    pos @first_vsc @second_asc -75;

#    pos @first_f @second_o  -45;
    pos @first_f @second_HighAscAfter_longf 100;

    pos @first_m @second_v  -16;

    pos @first_v @all_A     -50;
#    pos @first_v @second_o  -10;

    pos @first_halfring @second_A -70;
subtable;

## Cyrillic
@first_Ghe = [ uni0413 uni0490 ];
@first_Te = [uni0422 ];
@first_de = [ uni0434 uni043B ];
@first_en = [ uni0438 uni043C uni043D uni043F uni0446 uni0447 uni0448 uni0449 uni044B uni044F uni045F uni0434.alt uni043B.alt ];

@second_ie = [ uni0430 uni0435 uni0437 uni043E uni0441 uni044D uni044F uni0454 uni0455 uni04E9 ];
@second_en = [ uni0432 uni0433 uni0438 uni043A uni043C uni043D uni043F uni0446 uni0448 uni0449 uni044B uni044C uni044E uni045A uni045F uni0434.alt uni043B.alt uni0459.alt ];
@second_de = [ uni0434 uni043B uni0459 ];
@second_te = [ uni0442 uni044A ];
@second_cyr_u = [ uni0443 ];
@second_zhe = [ uni0436 uni0445 ];
@second_ef = [ uni0444 ];
@second_che = [ uni0447 ];

    pos @first_Ghe @second_ie -130;
    pos @first_Ghe @second_de -140;
    pos @first_Ghe @second_en -100;
    pos @first_Ghe @second_te -130;
    pos @first_Ghe @second_cyr_u -115;
    pos @first_Ghe @second_zhe -105;
    pos @first_Ghe @second_ef -70;
    pos @first_Ghe @second_che -115;

    pos @first_Te @second_ie -125;
    pos @first_Te @second_de -135;
    pos @first_Te @second_en -95;
    pos @first_Te @second_te -130;
    pos @first_Te @second_cyr_u -110;
    pos @first_Te @second_zhe -100;
    pos @first_Te @second_ef -65;
    pos @first_Te @second_che -110;
    
subtable;

## Greek
@grk_topAcc = [ uni0308 uni0313 uni0314 uni0342 uni0342.alt gravecomb.grk acutecomb.grk uni0313.grk uni0314.grk gravecomb.grkstack acutecomb.grkstack uni0308.grkstack uni0313.grkstack uni0314.grkstack
uni0308.sc uni0313.sc uni0314.sc uni0342.sc gravecomb.grksc acutecomb.grksc uni0313.grksc uni0314.grksc 
gravecomb.grkstacksc acutecomb.grkstacksc uni0308.grkstacksc uni0313.grkstacksc uni0314.grkstacksc uni0342.altsc ];
@grk_tlAcc1 = [ uni0313 uni0314 gravecomb.grk acutecomb.grk
	uni0313.sc uni0314.sc gravecomb.grksc acutecomb.grksc ];
@grk_tlAcc2 = [ uni0313.grk uni0314.grk gravecomb.grkstack acutecomb.grkstack uni0308 uni0313.grkstack uni0314.grkstack uni0342 uni0342.alt
uni0313.grksc uni0314.grksc gravecomb.grkstacksc acutecomb.grkstacksc uni0308.sc uni0313.grkstacksc uni0314.grkstacksc uni0342.sc uni0342.altsc ];
@first_Tau = [ Tau ];
@first_Upsilon = [ Upsilon Upsilontonos Upsilondieresis uni1F59 uni1F5B uni1F5D uni1F5F ];
@first_Gamma = [ Gamma ];

@second_GrNoAsc = [ alpha uni1FB3 gamma epsilon eta uni1FC3 iota kappa mu nu omicron pi rho sigma sigma1 tau upsilon chi omega uni1FF3 ];

    pos @first_Tau @second_GrNoAsc -90;
    pos @first_Gamma @second_GrNoAsc -100;
    pos @first_Upsilon @second_GrNoAsc -50;
} kern;

lookup ckern1 {
    pos Alpha' <0 0 200 0> uni0345.cap1;
    pos Alpha' <0 0 340 0> uni0345.cap2;
    pos Alpha' <0 0 315 0> uni0345.sc1;
    pos [ Epsilon Eta Iota Rho ]' <79 0 79 0> @grk_tlAcc1;
    pos [ Epsilon Eta Iota ]' <218 0 218 0> @grk_tlAcc2;
    pos Eta' <79 0 79 0> uni0345.cap @grk_tlAcc1;
    pos Eta' <218 0 218 0> uni0345.cap @grk_tlAcc2;
    pos Eta' <79 0 279 0> uni0345.cap1 @grk_tlAcc1;
    pos Eta' <218 0 418 0> uni0345.cap1 @grk_tlAcc2;
    pos Eta' <79 0 419 0> uni0345.cap2 @grk_tlAcc1;
    pos Eta' <218 0 558 0> uni0345.cap2 @grk_tlAcc2;
    pos Eta' <79 0 394 0> uni0345.sc1 @grk_tlAcc1;
    pos Eta' <218 0 533 0> uni0345.sc1 @grk_tlAcc2;
    pos Eta' <0 0 200 0> uni0345.cap1;
    pos Eta' <0 0 340 0> uni0345.cap2;
    pos Eta' <0 0 315 0> uni0345.sc1;    
    pos Omicron' <21 0 21 0> @grk_tlAcc1;
    pos Omicron' <157 0 157 0> @grk_tlAcc2;
    pos Upsilon' <84 0 84 0> @grk_tlAcc1;
    pos Upsilon' <223 0 223 0> @grk_tlAcc2;
    pos Omega' <121 0 121 0> @grk_tlAcc2;
    pos Omega' <121 0 121 0> uni0345.cap @grk_tlAcc2;
    pos Omega' <121 0 321 0> uni0345.cap1 @grk_tlAcc2;
    pos Omega' <121 0 436 0> uni0345.cap2 @grk_tlAcc2;
    pos Omega' <121 0 461 0> uni0345.sc1 @grk_tlAcc2;
    pos Omega' <0 0 200 0> uni0345.cap1;
    pos Omega' <0 0 340 0> uni0345.cap2;
    pos Omega' <0 0 315 0> uni0345.sc1;
    pos [ Alpha.sc Eta.sc Omega.sc alpha.sc eta.sc omega.sc ]' <0 0 315 0> uni0345.sc1;
} ckern1;

lookup ckern2 {
    pos @first_Upsilon' -70 @grk_topAcc @grk_topAcc @second_GrNoAsc;
    pos @first_Upsilon' -70 @grk_topAcc @second_GrNoAsc;
} ckern2;

feature kern {
      lookup kern;
      lookup ckern1;
      lookup ckern2;
} kern;
