X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=FLT%2FDEVA-OTF.flt;h=37ce28ed2d6dbc501570e3e5364e180866278d4b;hb=72280ac651eaefdce6a829672c4198274b7f26c0;hp=37da5b7c6ccbd46cb548da5b04fc0df13f8fb255;hpb=524ff54f71db8c9c9ce04804a05bd62051afb357;p=m17n%2Fm17n-db.git diff --git a/FLT/DEVA-OTF.flt b/FLT/DEVA-OTF.flt index 37da5b7..37ce28e 100644 --- a/FLT/DEVA-OTF.flt +++ b/FLT/DEVA-OTF.flt @@ -29,7 +29,7 @@ (font (nil nil unicode-bmp :otf=deva=rphf))) (category - ;; C: consonant (except for R) + ;; C: consonant (except for RA) ;; R: consonant RA ;; n: NUKTA ;; H: HALANT @@ -45,11 +45,8 @@ ;; N: ZWNJ ;; J: ZWJ ;; X: generic - ;; Z: internal use - (0x0900 ?Z) ; internal use - (0x0901 0x097F ?X) ; generic - (0x0901 ?A) ; SIGN CANDRABINDU - (0x0902 ?A) ; SIGN ANUSVARA + (0x0900 0x097F ?X) ; generic + (0x0901 0x0902 ?A) ; SIGN CANDRABINDU .. ANUSVARA (0x0903 ?a) ; SIGN VISARGA (0x0904 0x0914 ?V) ; LETTER SHORT A .. AU (0x0915 0x0939 ?C) ; LETTER KA .. HA @@ -74,26 +71,43 @@ (0x200D ?J) ; ZWJ ) +;; Compose consonant and nukta +(generator + (0 + (cond + ((0x0928 0x093C) 0x0929) + ((0x0930 0x093C) 0x0931) + ((0x0933 0x093C) 0x0934) + ((0x0915 0x093C) 0x0958) + ((0x0916 0x093C) 0x0959) + ((0x0917 0x093C) 0x095A) + ((0x091C 0x093C) 0x095B) + ((0x0921 0x093C) 0x095C) + ((0x0922 0x093C) 0x095D) + ((0x092B 0x093C) 0x095E) + ((0x092F 0x093C) 0x095F) + ("." =)) + *)) + ;; Reordering (generator (0 (cond ;; A syllable containing a vowel sign. - ;;1 23 45 6 7 89 A BC D - ("(RH)?(([CR]n?H)*[CR]n?)((m)|(b)|([up]))((A)|(a))?((S)|(s))?" - < | - (5 =) (2 move-h) (6 =) (13 =) (7 =) (1 otf:deva=rphf+) (9 =) (12 =) (10 =) - | >) + ;;1 23 45 6 7 8 9 10 11 + ("(RH)?(([CR]n?H)*[CR]n?)((m)|(b)|([up]))(A)?(a)?(S)?(s)?" + < | (5 =) (2 move-h) (6 =) (11 =) (7 =) (1 otf:deva=rphf+) + (8 =) (10 =) (9 =) | >) ;; A syllable without vowel signs but with a vowel modifier. - ;;1 23 45 6 78 9 - ("(RH)?(([CR]n?H)*[CR]n?)((A)|(a))((S)|(s))?" - < | (2 move-h) (9 =) (1 otf:deva=rphf+) (5 =) (8 =) (6 =) | >) + ;;1 23 45 6 7 8 + ("(RH)?(([CR]n?H)*[CR]n?)((A)|(a))(S)?(s)?" + < | (2 move-h) (8 =) (1 otf:deva=rphf+) (5 =) (7 =) (6 =) | >) ;; No vowel signs, No vowel modifiers, but with a stress sign or an accent. - ;;1 23 45 6 + ;;1 23 45 6 ("(RH)?(([CR]n?H)*[CR]n?)((S)|(s))" - < | (2 move-h) (6 =)(1 otf:deva=rphf+) (5 =) | >) + < | (2 move-h) (6 =) (1 otf:deva=rphf+) (5 =) | >) ;; A special case: eyelash RA ("(RH)J" @@ -105,81 +119,54 @@ < | (2 = *) (1 otf:deva=rphf+) | >) ;; When a syllable ends with a halant, add a ZWNJ explicitly. - ;;1 23 4 5 - ("(RH)?(([CR]n?H)*[CR]n?)(H)?(N)?" + ;;1 23 4 + ("(RH)?(([CR]n?H)*[CR]n?)(H)?N?" < | (2 move-h) (1 otf:deva=rphf+) (4 = 0x200C) | >) ;; A syllable starting with an independent vowel. - ;;1 23 4 56 7 - ("(V)((A)|(a))?((S)|(s))?" - < | (1 =) (7 =) (3 =) (6 =) (4 =) | >) + ;;1 2 3 4 5 + ("(V)(A)?(a)?(S)?(s)?" + < | (1 =) (5 =) (2 =) (4 =) (3 =) | >) ("." =)) *) - ;; Move the halant that follows the base consonant to the end. - ;; Put a mark after the base consonant. (move-h (cond - ;;12 3 4 56 - ("(([CR]n?H)*(Cn?))(H)((RH)*R)$" - (1 = *) 0x0900 (5 = *) (4 =)) - ;;1 2 34 - ("(R)(H)((RH)*R)$" - (1 =) 0x0900 (3 = *) (2 =)) - (".+" = * 0x0900)))) - -;; Language forms If a syllable ends with a halant and a ZWNJ, render -;; the final halant explicitly. Do not apply 'blwf' nor 'half' to the -;; initial RA. + ("([CRnH]+)(H)(R)$" + (1 = *) (3 =) (2 =)) + (".+" + = *)))) + +;; If a syllable ends with a halant and a ZWNJ, render the final +;; halant explicitly. Do not apply 'blwf' nor 'half' to the initial +;; RA. (generator (0 (cond - (" (R)([^ ]*)(H)N " + (" (R)([^N]*)(H)N " | (1 =) (2 gsub1) (3 =) |) (" (m?R)([^ ]*) " - | (1 = *) (2 gsub1) |) - (" ([^ ]+)(H)N " + | (1 = *) (2 gsub1) (3 = *) |) + (" ([^N]+)(H)N " | (1 gsub1) (2 =) |) (" ([^ ]+) " - | (1 gsub1) |) + | (1 gsub1) |) ("." =)) *) (gsub1 - otf:deva=nukt,akhn,blwf,half,vatu+)) - -;; Apply 'pres' to get pre-base conjuncts. -(generator - (0 - (cond - (" (m)?([^ ]+) " - | (1 =) (2 otf:deva=pres+) |) - ("." =)) - *)) - -;; When the number of glyphs between a pre-base vowel modifier and the -;; post-base mark is more than one, move the pre-base vowel before the -;; final glyph. -(generator - (0 - (cond - (" (m)([^Z ]+)([^Z ])Z([^ ]*) " - | (2 = *) (1 =) (3 =) (4 = *) |) - (" ([^Z ]+)Z([^ ]*) " - | (1 = *) (2 = *) |) - ("." =)) - *)) + otf:deva=nukt,akhn,blwf,half,vatu,pres+)) -;; Apply other features. The 'vatu' feature is applied again to get -;; the conjunct of base and post-base. +;; Apply other features. The 'pres' feature is applied again for +;; pre-base vowel sign. (generator (0 (cond (" ([^ ]+) " - (1 otf:deva=vatu,abvs,blws,psts,haln)) + (1 otf:deva=pres,abvs,blws,psts,haln+abvm,blwm,dist)) ("." - [ otf:deva=+ ])) + [ = ])) *)) ;; Local Variables: