From: ntakahas Date: Tue, 4 Sep 2007 09:16:43 +0000 (+0000) Subject: Remove ZWJ's _after_ 'vatu' and 'pres' are applied. X-Git-Tag: REL-1-5-0~43 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=1f2bc92215dee2e8c21a597d266c86764714ca3c;p=m17n%2Fm17n-db.git Remove ZWJ's _after_ 'vatu' and 'pres' are applied. --- diff --git a/FLT/DEVA-OTF.flt b/FLT/DEVA-OTF.flt index 6e98d6e..b9ed5d6 100644 --- a/FLT/DEVA-OTF.flt +++ b/FLT/DEVA-OTF.flt @@ -73,6 +73,7 @@ (0x200D ?J) ; ZWJ ) +;; Stage 0 ;; Compose consonant and nukta (generator (0 @@ -91,7 +92,8 @@ ("." =)) *)) -;; Reordering +;; Stage 1 +;; Syllable identification and eordering. (generator (0 (cond @@ -158,7 +160,7 @@ (nomarks (cond - ;; Ending with a Halant and ZWJ. + ;; Ending with a Halant and a ZWJ. (".+HJ$" (0 del-reph) (0 reph)) @@ -171,17 +173,9 @@ (0 move-h) (0 reph)))) ) -;; Apply 'nukt' and 'akhn'. -(generator - (0 - (cond - (" ([^ ]+) " - | (1 otf:deva=nukt,akhn+) |) - ("." =)) - *)) - -;; Apply either 'half' or 'blwf' to consonants. If a syllable ends -;; with a halant and a ZWNJ, render the final halant explicitly. +;; Stage 2 +;; Apply GSUB features. If a syllable ends with a halant and a ZWNJ, +;; render the final halant explicitly. (generator (0 (cond @@ -191,11 +185,11 @@ (" (m)?(RH)J([^ ]*) " | (1 =) (2 otf:deva=half+) (3 gsub) |) - ;; Avoid applying 'half' and 'blwf' to the initial RA. + ;; Avoid applying 'blwf' and 'half' to the "RH" at the beginning; (" (R)(.*)(H)N " | (1 =) (2 gsub) (3 =) |) (" (m?R)([^ ]*) " - | (1 = *) (2 gsub) |) + | (1 otf:deva=pres+) (2 gsub) |) (" (.+)(H)N " | (1 gsub) (2 =) |) @@ -205,24 +199,31 @@ ("." =)) *) - ;; Dispite Rule R5a (p.305), we use the below form to depict the - ;; sequence "RHJ" at a non-initial position. This is to avoid - ;; interpreting the sequence "CHRHJ" as "CH" + "RHJ". It should be - ;; parsed as "CHR" + "HJ". + ;; Dispite Rule R5a (The Unicode Standard 5.0, p.305), we use the + ;; below form to depict the sequence "RHJ" at a non-initial position. + ;; This is to avoid interpreting the sequence "CHRHJ" as "CH" + + ;; "RHJ". It should be parsed as "CHR" + "HJ". (gsub - (cond - ("(.H)J?(.*)" - (1 otf:deva=blwf,half+) (2 gsub)) - ("(.)(.*)" - (1 =) (2 gsub)))) + otf:deva=nukt,akhn,blwf,half,vatu,pres+) ) +;; Stage 3 +;; ZWJ's are used to prevent consonant conjuncts, so they are removed +;; only after 'vatu' and 'pres' have been applied. +(generator + (0 + (cond + ("J") + ("." =)) + *)) + +;; Stage 4 ;; Apply other features. (generator (0 (cond (" ([^ ]+) " - (1 otf:deva=vatu,pres,abvs,blws,psts,haln+abvm,blwm,dist)) + (1 otf:deva=abvs,blws,psts,haln+abvm,blwm,dist)) ("." [ = ])) *))