lookup ccmpYiddish1 {
  lookupflag RightToLeft;
    sub \uniFB1D by \uniE804 ;
} ccmpYiddish1;

lookup ccmpYiddish_dflt {
  lookupflag RightToLeft;
    sub \afii57718 \afii57798  by \afii57705;
#   sub \afii57665 \afii57841  by \uniFB4C; # letters with rafe are processed in GPOS
#   sub \afii57675 \afii57841  by \uniFB4D;
#   sub \afii57684 \afii57841  by \uniFB4E;
} ccmpYiddish_dflt;

# The YOD + HIRIQ ligature must precede YOD + YOD, otherwise YOD + YOD + HIRIQ would break
lookup ccmpYiddish2 {
  lookupflag RightToLeft;
    sub \afii57673 \afii57793  by \uniE804;
} ccmpYiddish2;

lookup ccmpYiddish3 {
  lookupflag RightToLeft;
    sub \afii57669 \afii57669  by \afii57716;
    sub \afii57669 \afii57673  by \afii57717;
    sub \afii57673 \afii57673  by \afii57718;
    sub \afii57718 \afii57798  by \afii57705;
    sub \afii57673 \afii57673 \afii57798  by \afii57705;
    sub \afii57664 \afii57798  by \uniFB2E;
    sub \afii57664 \afii57797  by \uniFB2F;
    sub \afii57665 \afii57841  by \uniFB4C;
    sub \afii57675 \afii57841  by \uniFB4D;
    sub \afii57684 \afii57841  by \uniFB4E;
} ccmpYiddish3;

feature ccmp {
  script hebr;
    language dflt ;
      lookup ccmpYiddish_dflt;
    language JII  exclude_dflt;
      lookup ccmpYiddish1;
      lookup ccmpYiddish2;
      lookup ccmpYiddish3;
} ccmp;

