From: handa Date: Fri, 6 Aug 2004 12:08:39 +0000 (+0000) Subject: Apply GSUB to prebase part and postbase part in X-Git-Tag: REL-1-1-0~29 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5fc86161d7df1d2338236533339b8df0a5a91479;p=m17n%2Fm17n-db.git Apply GSUB to prebase part and postbase part in different stages. --- diff --git a/MLM-OTF.flt b/MLM-OTF.flt index b90f654..abf1326 100644 --- a/MLM-OTF.flt +++ b/MLM-OTF.flt @@ -65,12 +65,12 @@ (0x0D61 ?V) ; VOCALIC LL (0x200C ?N) ; ZWNJ (0x200D ?J) ; ZWJ - (0x0D7D ?x) - (0x0D7E ?y) - (0x0D7F ?z) + (0x0D7D ?x) ; marker inserted before base-C + (0x0D7E ?y) ; marker inserted after base-C + (0x0D7F ?z) ; marker inserted before last Ra ) -;; The first step is to extract a syllable while moving a Halant +;; The 1st stage is to extract a syllable while moving a Halant ;; following Cbase to the tail and partitioning two-part matras into ;; parts. (generator @@ -114,9 +114,9 @@ (1 = *) 0x0D7D (3 =) 0x0D7E (4 = *) 0x0D7F 0x0D30 0x0D4D) ("(([CBPR]H)*)([C])H(([BR]H)*[BP])$" ; Cbase is at head or middle. (1 = *) 0x0D7D (3 =) 0x0D7E (4 = *) 0x0D4D) - ("(.)H(.*)$" ; No Cbase, move the first + ("(RH)?(.)H(.*)$" ; No Cbase, move the first ; Halant to the tail. - 0x0D7D 0x0D7E (1 = *) (2 = *) 0x0D4D))) + (1 = *) 0x0D7D (2 = ) 0x0D7E (3 = *) 0x0D4D))) ;; Partition two-part matras into parts. (partition @@ -129,66 +129,76 @@ ;; ((0x0D4C) 0x0D57) ))) -;; The second stage is to move Mpre to the head. +;; The 2nd stage is to apply GSUB for prebase part. (generator (0 (cond - (" [NJ]([^ ]*) " - = *) - (" ([^m ]*)(m)([^ ]*) " - | (2 =) (1 = *) (3 = *) |) - (" ([^ ]*) " - = *) - ("." =)) - *)) - -;; The third stage is to drive OTF tables. -(generator - (0 - (cond - ;; Originally [CBPR]H is followed by ZWNJ. Apply only GPOS - ;; features (if any). + ;; Originally [CBPR]H is followed by ZWNJ. Apply no feature (just + ;; cmap). (" N([^ ]*) " - (1 otf:mlym=)) + (1 otf:mlym=+)) ;; Originally [CBPR]H is followed by ZWJ. Apply only GSUB haln - ;; feature and GPOS features (if any). + ;; feature. (" J([^ ]*) " - (1 otf:mlym=haln)) + (1 otf:mlym=haln+)) ;; Syllable starting with a consonant should match this pattern. (" ([^ y]*)y([^ z]*)(z..)?([^ ]*) " | - (1 otf:mlym=~blwf,~pstf,~blws,~psts,*) ; Prebase part. + (1 otf:mlym=~blwf,~pstf,~blws,~psts,*+) ; Prebase part. 0x0D7E ; Preserve this marker. - (2 otf:mlym=~akhn,~haln,blwf,pstf,vatu,*) ; Postbase part. - (3 = otf:mlym=pstf) ; Optional tailing RH. - (4 otf:mlym=) ; Optional Mpost. + (2 = *) ; Postbase part. + (3 = *) ; Optional tailing RH. + (4 = *) ; Optional Mpost. |) ;; A syllable starting with an independent vowel. (" ([^ ]*) " - (1 otf:mlym)) + (1 otf:mlym+)) - ;; Any other independent character. Apply no feature (just CMAP). + ;; Any other independent character. Apply no feature (just cmap). ("." [ otf:mlym=+ ] )) *)) -;; The last stage is to move Mpre (if any) backward and tailing RH (if -;; any) forward to just before the base consonant. +;; The 3rd stage is to move Mpre (if any) and tailing RH (if any) +;; forward to just before the base consonant. (generator (0 (cond - (" (m)?([^xy]*)x([^y]*)y([^ z]*)(z(.))?([^ ]*) " - (2 = *) (1 =) (5 (6 =)) (3 = *) (4 = *) (7 = *)) - (" (m)?([^y]*)y([^ z]*)(z(.))?([^ ]*) " - (1 =) (4 (5 =)) (2 = *) (3 = *) (6 = *)) + (" ([^x]*)(.)xy([^ zm]*)(z(..))?(m)?([^ ]*) " + | (1 = *) (4 (5 otf:mlym=pstf+)) (6 =) 0x0D7D (2 =) (3 = *) (7 = *) |) + (" ([^x]*)x(.)y([^ zm]*)(z(..))?(m)?([^ ]*) " + | (1 = *) (4 (5 otf:mlym=pstf+)) (6 =) 0x0D7D (2 =) (3 = *) (7 = *) |) + (" xy([^ m]*)(m)?([^ ]*) " + | (2 =) 0x0D7D (1 = *) (3 = *) |) ("[NJ]") ("." = )) *)) +;; The 4th stage is to apply GSUB to postbase part. +(generator + (0 + (cond + (" ([^x]*)x(.H) " + | (1 = *) (2 otf:mlum=haln) |) + (" ([^x]*)x([^ ]*) " + | (1 = *) (2 otf:mlym=~akhn,~haln,blwf,pstf,vatu,*+) |) + ("." =)) + *)) + + + +;; The 5th (last) stage is to apply GPOS features. +(generator + (0 + (cond + (" ([^ ]*) " (1 otf:mlym=)) + ("." =)) + *)) + ;; Local Variables: ;; mode: emacs-lisp ;; End: