languagesystem DFLT dflt;
languagesystem latn dflt;
languagesystem latn AZE;
languagesystem latn CRT;
languagesystem latn MOL;
languagesystem latn NLD;
languagesystem latn PLK;
languagesystem latn ROM;
languagesystem latn TRK;
languagesystem cyrl dflt;

# complete features
table head{
FontRevision 1.101;
} head;

@altsrc1=[# all alternates
at copyright fraction paragraph registered
epsilon mu pi phi rho theta
macron macron.cap Imacron imacron imacron.sc];
#
@altsrc2=[# "genuine" alternates
at copyright fraction paragraph registered];
#
@altsrc3=[# "Greek" alternates
epsilon mu pi phi rho theta];
#
@altsrc4=[# "Idris" alternates
macron macron.cap Imacron imacron imacron.sc];

@altres1=[# all alternates
at.alt copyright.alt fraction.alt paragraph.alt registered.alt
epsilon.alt mu.greek uni03D6 uni03D5 rho.alt uni03D1
macron.alt macron.cap.alt Imacron.alt imacron.alt imacron.alt.sc];
#
@altres2=[# "genuine" alternates
at.alt copyright.alt fraction.alt paragraph.alt registered.alt];
@altres3=[# "Greek" alternates
epsilon.alt mu.greek uni03D6 uni03D5 rho.alt uni03D1];
#
@altres4=[# "Idris" alternates
macron.alt macron.cap.alt Imacron.alt imacron.alt imacron.alt.sc];

@othbas=[ampersand cent dollar];

@othold=[ampersand # ampersand.oldstyle in the future?
cent.oldstyle dollar.oldstyle];  

@figlintab=[zero one two three four five six seven eight nine];

@figlinprop=[zero.prop one.prop two.prop three.prop four.prop five.prop
six.prop seven.prop eight.prop nine.prop];

@figoldtab=[zero.taboldstyle one.taboldstyle two.taboldstyle three.taboldstyle
four.taboldstyle five.taboldstyle six.taboldstyle seven.taboldstyle
eight.taboldstyle nine.taboldstyle];

@figoldprop=[zero.oldstyle one.oldstyle two.oldstyle three.oldstyle
four.oldstyle five.oldstyle six.oldstyle seven.oldstyle eight.oldstyle
nine.oldstyle];

@figinfr=[zero.inferior one.inferior two.inferior three.inferior
four.inferior five.inferior six.inferior seven.inferior eight.inferior
nine.inferior];

@figsupr=[zero.superior one.superior two.superior three.superior
four.superior five.superior six.superior seven.superior eight.superior
nine.superior];

@figdnom=[zero.dnom one.dnom two.dnom three.dnom
four.dnom five.dnom six.dnom seven.dnom eight.dnom
nine.dnom];

@fignumr=[zero.numr one.numr two.numr three.numr
four.numr five.numr six.numr seven.numr eight.numr
nine.numr];

@allzeros=[zero zero.prop zero.taboldstyle zero.oldstyle zero.inferior
zero.superior zero.dnom zero.numr zero.slash]; # but perthousandzero, just because

@letcapbas=[A B C D E F G H I J K L M N O P Q R S T U V W X Y Z];
@letsmabas=[a b c d e f g h i j k l m n o p q r s t u v w x y z];
@letcscbas=[a.sc b.sc c.sc d.sc e.sc f.sc g.sc h.sc i.sc j.sc k.sc l.sc m.sc
n.sc o.sc p.sc q.sc r.sc s.sc t.sc u.sc v.sc w.sc x.sc y.sc z.sc];

@letcapoth=[Aacute Abreve Abreveacute Abrevedotbelow Abrevegrave
Abrevehookabove Abrevetilde Acircumflex Acircumflexacute Acircumflexdotbelow
Acircumflexgrave Acircumflexhookabove Acircumflextilde Adblgrave Adieresis
Adotbelow AE AEacute Agrave Ahookabove Amacron Aogonek Aogonekacute Aring
Aringacute Atilde Cacute Ccaron Ccedilla Ccircumflex Cdotaccent Dcaron Dcroat
Ddotbelow Dlinebelow Eacute Ebreve Ecaron Ecircumflex Ecircumflexacute
Ecircumflexdotbelow Ecircumflexgrave Ecircumflexhookabove Ecircumflextilde
Edblgrave Edieresis Edotaccent Edotbelow Egrave Ehookabove Emacron Eng
Eogonek Eogonekacute Ereversed Eth Etilde Gacute Gbreve Gcaron Gcircumflex
Gcommaaccent Gdotaccent S_S # Germandbls
 Hbar Hbrevebelow Hcircumflex Hdieresis Hdotbelow
 H_uni0303 # Htilde
 I_J Iacute Ibreve Icircumflex Idblgrave Idieresis Idotbelow Igrave
Ihookabove Imacron Imacron.alt Iogonek Iogonekacute Itilde Jacute Jcircumflex
Kcommaaccent Lacute Lcaron Lcommaaccent Ldot Ldotbelow Ldotbelowmacron Lslash
 L_uni0303 # Ltilde
 Mdotbelow Nacute Ncaron Ncommaaccent Ndotaccent Ndotbelow Ntilde
Oacute Obreve Ocircumflex Ocircumflexacute Ocircumflexdotbelow
Ocircumflexgrave Ocircumflexhookabove Ocircumflextilde Odblgrave Odieresis
Odotbelow OE Ograve Ohookabove Ohorn Ohornacute Ohorndotbelow Ohorngrave
Ohornhookabove Ohorntilde Ohungarumlaut Omacron Oogonek Oogonekacute Oslash
Oslashacute Otilde Racute Rcaron Rcommaaccent Rdblgrave Rdotaccent Rdotbelow
Rdotbelowmacron Sacute Scaron Scedilla Scircumflex
 uni0218 # Scommaaccent
 Sdotbelow Tcaron Tcedilla
 uni021A # Tcommaaccent
 T_uni0308 # Tdieresis
 Tdotbelow Thorn Tlinebelow T_uni0303 # Ttilde
 Uacute Ubreve Ubrevebelowinverted Ucircumflex Udblgrave Udieresis Udotbelow
Ugrave Uhookabove Uhorn Uhornacute Uhorndotbelow Uhorngrave Uhornhookabove
Uhorntilde Uhungarumlaut Umacron Uogonek Uring Utilde Wacute Wcircumflex
Wdieresis Wgrave Yacute Ycircumflex Ydieresis Ydotbelow Ygrave Yhookabove
Ytilde Zacute Zcaron Zdotaccent Zdotbelow];

@letsmaoth=[aacute abreve abreveacute abrevedotbelow abrevegrave
abrevehookabove abrevetilde acircumflex acircumflexacute acircumflexdotbelow
acircumflexgrave acircumflexhookabove acircumflextilde adblgrave adieresis
adotbelow ae aeacute agrave ahookabove amacron aogonek aogonekacute aring
aringacute atilde cacute ccaron ccedilla ccircumflex cdotaccent dcaron dcroat
ddotbelow dlinebelow eacute ebreve ecaron ecircumflex ecircumflexacute
ecircumflexdotbelow ecircumflexgrave ecircumflexhookabove ecircumflextilde
edblgrave edieresis edotaccent edotbelow egrave ehookabove emacron eng
eogonek eogonekacute ereversed eth etilde gacute gbreve gcaron gcircumflex
gcommaaccent gdotaccent germandbls hbar hbrevebelow hcircumflex hdieresis
 hdotbelow h_uni0303 # htilde
 i_j iacute ibreve icircumflex idblgrave idieresis idotbelow igrave
ihookabove imacron imacron.alt iogonek iogonekacute itilde jacute jcircumflex
kcommaaccent lacute lcaron lcommaaccent ldot ldotbelow ldotbelowmacron lslash
 l_uni0303 # ltilde
 mdotbelow nacute ncaron ncommaaccent ndotaccent ndotbelow ntilde
oacute obreve ocircumflex ocircumflexacute ocircumflexdotbelow
ocircumflexgrave ocircumflexhookabove ocircumflextilde odblgrave odieresis
odotbelow oe ograve ohookabove ohorn ohornacute ohorndotbelow ohorngrave
ohornhookabove ohorntilde ohungarumlaut omacron oogonek oogonekacute oslash
oslashacute otilde racute rcaron rcommaaccent rdblgrave rdotaccent rdotbelow
rdotbelowmacron sacute scaron scedilla scircumflex
 uni0219 # scommaaccent
 sdotbelow tcaron tcedilla
 uni021B # tcommaaccent
 tdieresis tdotbelow thorn tlinebelow t_uni0303 # ttilde
 uacute ubreve ubrevebelowinverted ucircumflex udblgrave udieresis udotbelow
ugrave uhookabove uhorn uhornacute uhorndotbelow uhorngrave uhornhookabove
uhorntilde uhungarumlaut umacron uogonek uring utilde wacute wcircumflex
wdieresis wgrave yacute ycircumflex ydieresis ydotbelow ygrave yhookabove
ytilde zacute zcaron zdotaccent zdotbelow];

@letcscoth=[aacute.sc abreve.sc abreveacute.sc abrevedotbelow.sc
abrevegrave.sc abrevehookabove.sc abrevetilde.sc acircumflex.sc
acircumflexacute.sc acircumflexdotbelow.sc acircumflexgrave.sc
acircumflexhookabove.sc acircumflextilde.sc adblgrave.sc adieresis.sc
adotbelow.sc ae.sc aeacute.sc agrave.sc ahookabove.sc amacron.sc aogonek.sc
aogonekacute.sc aring.sc aringacute.sc atilde.sc cacute.sc ccaron.sc
 ccedilla.sc ccircumflex.sc cdotaccent.sc dcaron.sc dcroat.sc ddotbelow.sc
dlinebelow.sc eacute.sc ebreve.sc ecaron.sc ecircumflex.sc
ecircumflexacute.sc ecircumflexdotbelow.sc ecircumflexgrave.sc
ecircumflexhookabove.sc ecircumflextilde.sc edblgrave.sc edieresis.sc
edotaccent.sc edotbelow.sc egrave.sc ehookabove.sc emacron.sc eng.sc
eogonek.sc eogonekacute.sc ereversed.sc eth.sc etilde.sc gacute.sc gbreve.sc
gcaron.sc gcircumflex.sc gcommaaccent.sc gdotaccent.sc germandbls.sc hbar.sc
hbrevebelow.sc hcircumflex.sc hdieresis.sc hdotbelow.sc
 h_uni0303.sc # htilde.sc
 i_j.sc iacute.sc ibreve.sc icircumflex.sc idblgrave.sc idieresis.sc
idotbelow.sc igrave.sc ihookabove.sc imacron.sc imacron.alt.sc iogonek.sc
iogonekacute.sc itilde.sc jacute.sc jcircumflex.sc kcommaaccent.sc lacute.sc
lcaron.sc lcommaaccent.sc ldot.sc ldotbelow.sc ldotbelowmacron.sc lslash.sc
 l_uni0303.sc # ltilde.sc
 mdotbelow.sc nacute.sc ncaron.sc ncommaaccent.sc ndotaccent.sc ndotbelow.sc
ntilde.sc oacute.sc obreve.sc ocircumflex.sc ocircumflexacute.sc
ocircumflexdotbelow.sc ocircumflexgrave.sc ocircumflexhookabove.sc
ocircumflextilde.sc odblgrave.sc odieresis.sc odotbelow.sc oe.sc ograve.sc
ohookabove.sc ohorn.sc ohornacute.sc ohorndotbelow.sc ohorngrave.sc
ohornhookabove.sc ohorntilde.sc ohungarumlaut.sc omacron.sc oogonek.sc
oogonekacute.sc oslash.sc oslashacute.sc otilde.sc racute.sc rcaron.sc
rcommaaccent.sc rdblgrave.sc rdotaccent.sc rdotbelow.sc rdotbelowmacron.sc
sacute.sc scaron.sc scedilla.sc scircumflex.sc
 uni0219.sc # scommaaccent.sc
 sdotbelow.sc tcaron.sc tcedilla.sc
 uni021B.sc # tcommaaccent.sc
 tdieresis.sc tdotbelow.sc thorn.sc tlinebelow.sc
 t_uni0303.sc # ttilde.sc
 uacute.sc ubreve.sc ubrevebelowinverted.sc ucircumflex.sc udblgrave.sc
udieresis.sc udotbelow.sc ugrave.sc uhookabove.sc uhorn.sc uhornacute.sc
uhorndotbelow.sc uhorngrave.sc uhornhookabove.sc uhorntilde.sc
uhungarumlaut.sc umacron.sc uogonek.sc uring.sc utilde.sc wacute.sc
wcircumflex.sc wdieresis.sc wgrave.sc yacute.sc ycircumflex.sc ydieresis.sc
ydotbelow.sc ygrave.sc yhookabove.sc ytilde.sc zacute.sc zcaron.sc
zdotaccent.sc zdotbelow.sc];

@c2sc1=[@letcapbas @letcapoth];
@c2sc2=[@letcscbas @letcscoth];

@cpsp1=[@letcapbas @letcapoth];

@smcp1=[@letsmabas @letsmaoth];
@smcp2=[@letcscbas @letcscoth];

@figprop=[@figlinprop @figoldprop @othbas];
@figtab=[@figlintab @figoldtab @othbas];

@lnum1=[@figoldprop @figoldtab @othold];
@lnum2=[@figlinprop @figlintab @othbas];

@onum1=[@figlinprop @figlintab @othbas];
@onum2=[@figoldprop @figoldprop @othold];

@pnum1=[@figlintab @figoldtab];
@pnum2=[@figlinprop @figoldprop];

@tnum1=[@figlinprop @figoldprop];
@tnum2=[@figlintab @figoldtab];

feature aalt{
  feature locl; # Localized forms
# feature cpsp; # capital spacing
# feature frac; # fractions
  feature onum; # old style figures
  feature lnum; # lining figures
  feature pnum; # proportional figures
  feature tnum; # tabular figures
  feature sups; # superscripts
  feature subs; # subscripts
  feature sinf; # "scientific" subscripts (here = subs)
  feature numr; # numerators
  feature dnum; # denominators
# feature liga; # standard ligatures
# feature dlig; # discretionary ligatures
  feature smcp; # Small Capitals
  feature c2sc; # Small Capitals From Capitals
  feature salt; # Stylistic Alternates
  feature ss01; # Stylistic Set 1 = Stylistic Alternates
  feature ss02; # Stylistic Set 2
  feature ss03; # Stylistic Set 3
  feature ss04; # Stylistic Set 4
  feature zero; # slashed zero
} aalt;

feature locl { # Localized Forms
  script latn;
# Handling of Romanian [Ss]commaaccent and [Tt]commaaccent
    language ROM exclude_dflt;
      lookup locl_ROM {
        sub [Scedilla scedilla] by [uni0218 uni0219];
        sub [Tcedilla tcedilla] by [uni021A uni021B];
      } locl_ROM;
    language MOL exclude_dflt;
      lookup locl_ROM;
} locl;

feature cpsp { # Capital Spacing
  pos @cpsp1 <7 0 14 0>;
} cpsp;

feature smcp { # Small Capitals
  sub @smcp1 by @smcp2;
} smcp;

feature onum { # Old Style Figures
  sub @onum1 by @onum2;
} onum;

feature lnum { # Lining Figures
  sub @lnum1 by @lnum2;
} lnum;

feature pnum { # Proportional Figures
  sub @pnum1 by @pnum2;
} pnum;

feature tnum { # Tabular Figures
  sub @tnum1 by @tnum2;
} tnum;

feature sups {
  sub @figlintab by @figsupr;
  sub @figlinprop by @figsupr;
  sub @figoldtab by @figsupr;
  sub @figoldprop by @figsupr;
  sub @fignumr by @figsupr;
  sub @figdnom by @figsupr;
} sups;

feature numr {
  lookup numr1 {
    sub @figlintab by @fignumr;
    sub @figlinprop by @fignumr;
    sub @figoldtab by @fignumr;
    sub @figoldprop by @fignumr;
    sub @figsupr by @fignumr;
    sub @figinfr by @fignumr;
  } numr1;
  lookup numr2 {
    sub @fignumr slash' by fraction;
  } numr2;
} numr;

feature dnom {
  lookup dnom1 {
    sub @figlintab by @figdnom;
    sub @figlinprop by @figdnom;
    sub @figoldtab by @figdnom;
    sub @figoldprop by @figdnom;
    sub @figsupr by @figdnom;
    sub @figinfr by @figdnom;
  } dnom1;
  lookup dnom2 {
    sub slash' @figdnom by fraction;
  } dnom2;
} dnom;

feature subs {
  sub @figlintab by @figinfr;
  sub @figlinprop by @figinfr;
  sub @figoldtab by @figinfr;
  sub @figoldprop by @figinfr;
  sub @fignumr by @figinfr;
  sub @figdnom by @figinfr;
} subs;

feature sinf {
  sub @figlintab by @figinfr;
  sub @figlinprop by @figinfr;
  sub @figoldtab by @figinfr;
  sub @figoldprop by @figinfr;
  sub @fignumr by @figinfr;
  sub @figdnom by @figinfr;
} sinf;

feature frac {

 lookup frac1 {
  sub @figlintab by @fignumr;
  sub @figlinprop by @fignumr;
  sub @figoldtab by @fignumr;
  sub @figoldprop by @fignumr;
  sub @figinfr by @fignumr;
  sub @figsupr by @fignumr;
  sub @figdnom by @fignumr;
 } frac1;

 lookup frac2 {
  sub @fignumr slash' @fignumr by fraction;
 } frac2;

 lookup frac3 {
  sub one.numr fraction two.numr by onehalf;
#  sub one.numr fraction three.numr by onethird;
#  sub two.numr fraction three.numr by twothirds;
  sub one.numr fraction four.numr by onequarter;
  sub three.numr fraction four.numr by threequarters;
#  sub one.numr fraction five.numr by onefifth;
#  sub two.numr fraction five.numr by twofifths;
#  sub three.numr fraction five.numr by threefifths;
#  sub four.numr fraction five.numr by fourfifths;
#  sub one.numr fraction six.numr by onesixth;
#  sub five.numr fraction six.numr by fivesixths;
#  sub one.numr fraction eight.numr by oneeighth;
#  sub three.numr fraction eight.numr by threeeighths;
#  sub five.numr fraction eight.numr by fiveeighths;
#  sub seven.numr fraction eight.numr by seveneighths;
 } frac3;
 
  sub [fraction slash onehalf onequarter @figdnom threequarters] @fignumr' by @figdnom;

} frac;

feature liga { # Standard Ligatures
  lookup liga_f_f_l {
    sub f f l by f_f_l;
    sub f f by f_f;
    sub f l by f_l;
  } liga_f_f_l;
  script DFLT;
    language dflt;
      lookup liga_f_i {
        sub f_f i by f_f_i;
        sub f i by f_i;
      } liga_f_i;
  script cyrl;
    language dflt;
      lookup liga_f_i;
  script latn;
    language dflt;
      lookup liga_f_i;
    language NLD exclude_dflt;
      lookup liga_NLDa {
#       sub f i' j' by i_j;
#       sub f_f i' j' by i_j;
        sub i j by i_j;
        sub I J by I_J;
      } liga_NLDa;
      lookup liga_NLDb {
        sub f_f i by f_f_i;
        sub f i by f_i;
#       sub i j by i_j;
#       sub I J by I_J;
      } liga_NLDb;
    language PLK exclude_dflt;
      lookup liga_PLK {
        sub f_f i by f_f_i;
        sub f i by f_i ;
        sub f k by f_k;
      } liga_PLK;
    language MOL exclude_dflt;
      lookup liga_f_i;
    language ROM exclude_dflt;
      lookup liga_f_i;
    language AZE exclude_dflt;
    language CRT exclude_dflt;
    language TRK exclude_dflt;
} liga;

feature dlig { # Discretionary Ligatures
  sub comma comma by quotedblbase;
  sub hyphen hyphen hyphen hyphen by emdash;
  sub hyphen hyphen hyphen by threequartersemdash;
  sub hyphen hyphen by endash;
  sub quoteleft quoteleft by quotedblleft;
  sub quoteright quoteright by quotedblright;
# old Knuthian tradition...
  sub exclam quoteleft by exclamdown;
  sub question quoteleft by questiondown;
# AFDKO places grave at the slot 96 (ANSI / Mac)
  sub exclam grave by exclamdown;
  sub question grave by questiondown;
# BOP's idiosyncrasy (?)
  lookup perc_etc1 {
    sub percent @allzeros by perthousand;
    sub percent perthousandzero by perthousand; # imperceptible ligature
  } perc_etc1;
  lookup perc_etc2 {
    sub perthousand @allzeros by permyriad;
    sub perthousand perthousandzero by permyriad; # imperceptible ligature
  } perc_etc2;
  lookup perc_etc3 {
    # @allzeros' cannot be used, hence enumeration
    sub [permyriad perthousandzero] zero' by perthousandzero;
    sub [permyriad perthousandzero] zero.prop' by perthousandzero;
    sub [permyriad perthousandzero] zero.taboldstyle' by perthousandzero;
    sub [permyriad perthousandzero] zero.oldstyle' by perthousandzero;
    sub [permyriad perthousandzero] zero.inferior' by perthousandzero;
    sub [permyriad perthousandzero] zero.superior' by perthousandzero;
    sub [permyriad perthousandzero] zero.dnom' by perthousandzero;
    sub [permyriad perthousandzero] zero.numr' by perthousandzero;
    sub [permyriad perthousandzero] zero.slash' by perthousandzero;
  } perc_etc3;
} dlig;

feature c2sc { # Small Capitals From Capitals
  sub @c2sc1 by @c2sc2;
} c2sc;

feature salt { # Stylistic Alternates
  sub @altsrc1 by @altres1;
} salt;

feature ss01 { # Stylistic Set 1 = Stylistic Alternates
               # see http://www.typophile.com/node/32399 and
               # http://www.typotheque.com/fonts/opentype_feature_support/
  sub @altsrc1 by @altres1;
} ss01;

feature ss02 { # Stylistic Set 2
  sub @altsrc2 by @altres2;
} ss02;

feature ss03 { # Stylistic Set 3
  sub @altsrc3 by @altres3;
} ss03;

feature ss04 { # Stylistic Set 4
  sub @altsrc4 by @altres4;
} ss04;

feature zero { # Slashed Zero
   sub zero by zero.slash;
} zero;

feature kern {
  include (antpb8.krn);
  script latn;
  language AZE;
  language CRT;
  language MOL;
  language NLD;
  language PLK;
  language ROM;
  language TRK;
} kern;

feature size {
  parameters 80 3 75 85;
  sizemenuname 3 "Bold";
  sizemenuname 1 "Bold";
} size;

table hhea {
  Ascender  1105;
  Descender -289;
  LineGap   0;
} hhea;

table OS/2 {
  FSType        12;
  TypoAscender  750;
  TypoDescender -250;
  TypoLineGap   200;
  XHeight       450;
  CapHeight     700;
  winAscent     1105;
  winDescent    289;
  WidthClass    6;
  WeightClass   700;
} OS/2;

