1 ;; GUJ-OTF.flt -- Font Layout Table for Gujarati OpenType fonts
3 ;; National Institute of Advanced Industrial Science and Technology (AIST)
4 ;; Registration Number H15PRO112
6 ;; This file is part of the m17n database; a sub-part of the m17n
9 ;; The m17n library is free software; you can redistribute it and/or
10 ;; modify it under the terms of the GNU Lesser General Public License
11 ;; as published by the Free Software Foundation; either version 2.1 of
12 ;; the License, or (at your option) any later version.
14 ;; The m17n library is distributed in the hope that it will be useful,
15 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
16 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 ;; Lesser General Public License for more details.
19 ;; You should have received a copy of the GNU Lesser General Public
20 ;; License along with the m17n library; if not, write to the Free
21 ;; Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
26 ;;; For Gujarati OpenType fonts to draw Gujarati.
27 ;;; Tested with padmaa-Medium-1.5.ttf <http://www.indictrans.org/>
30 ;; C: general consonant
32 ;; V: independent vowel
38 ;; A: vowel modifier (above)
39 ;; a: vowel modifier (post)
40 ;; N: ZWNJ (ZERO WIDTH NON-JOINER)
41 ;; J: ZWJ (ZERO WIDTH JOINER)
47 (0x0965 ?E) ; DOUBLE DANDA
48 (0x0A80 0x0AFF ?E) ; ELSE
49 (0x0A81 ?A) ; SIGN CANDRABINDU
50 (0x0A82 ?A) ; SIGN ANUSVARA
51 (0x0A83 ?a) ; SIGN VISARGA
52 (0x0A85 0x0A94 ?V) ; LETTER AA .. LETTER AU
53 (0x0A95 0x0AB9 ?C) ; LETTER KA .. LETTER HA
54 (0x0AB0 ?R) ; LETTER RA
55 (0x0ABC ?n) ; SIGN NUKTA
56 (0x0ABE ?p) ; VOWEL SIGN AA (post)
57 (0x0ABF ?m) ; VOWEL SIGN I (pre)
58 (0x0AC0 ?p) ; VOWEL SIGN II (post)
59 (0x0AC1 0x0AC4 ?b) ; VOWEL SIGN U, UU, R, RR (below)
60 (0x0AC5 0x0AC8 ?u) ; VOWEL SIGN CANDRA E, E, AI (above)
61 (0x0AC9 0x0ACC ?p) ; VOWEL SIGN CANDRA O, O, AU (post)
62 (0x0ACD ?H) ; SIGN VIRAMA (HALANT)
63 (0x0AE0 0x0AE1 ?V) ; LETTER VOCALIC RR, LL
64 (0x0AE2 0x0AE3 ?b) ; VOWEL SIGN VOCALIC RR, LL (below)
65 (0x0AFD ?Z) ; internal use
66 (0x0AFE ?Y) ; internal use
67 (0x0AFF ?X) ; internal use
70 ;; Step 1 : Syllable identification, Reph and base consonant movements.
74 ;; A syllable ending with a vowel sign and/or a vowel modifier.
75 ("(([CR]n?H)*[CR]n?)([mubp][Aa]?|[Aa])"
76 < | (1 move-reph-vattu) (3 = *) | >)
78 ;; Forced Halant or half form.
79 ("(([CR]n?H)*[CR]n?)(H[NJ])"
80 < | (1 move-reph-vattu) (3 = =) | >)
82 ;; A syllable without a vowel sign nor a vowel modifier.
84 < | move-reph-vattu | >)
86 ;; A syllable starting with an independent vowel.
93 ;; Move the leading RH and the Halant on the base consonant to
94 ;; appropriate positions.
95 ;; 0x0AFF indicates the destination of below-, above-, post Matras.
98 ;; Ending with Halnt. Immitate a forced Halant form.
100 (1 move-reph-vattu) (2 =) 0x200C)
102 ;; Both Reph and Vattu.
104 ("(RH)(([CR]n?H)*[CR]n?)(H)(R)$"
105 (2 = *) (5 =) (4 =) 0x0AFF (1 = =))
107 ;; A special case of above.
109 (2 =) 0x0AFF (1 = =))
111 ;; Reph but no Vattu.
112 ("(RH)(([CR]n?H)*Cn?)$"
113 (2 = *) 0x0AFF (1 = =))
115 ;; No Reph but Vattu.
116 ("(Cn?(H[CR]n?)*)(H)(R)$"
117 (1 = *) (4 =) (3 =) 0x0AFF)
119 ;; Neither Reph nor Vattu.
123 ;; Step 2 : Matra movements and OTF forms.
128 (" ([^X ]*)X(RH)?(m)?([bup])?([Aa])? "
129 | (3 =) (1 otf:gujr=~rphf,*) (4 =) (2 otf:gujr=rphf) (5 =) |)
131 (" ([^X ]*)X(RH)?(HJ) "
132 | (1 = *) (2 otf:gujr=rphf) (3 = =) |)
134 (" ([^X ]*)X(RH)?(H)N "
135 | (1 otf:gujr=~rphf,*) (2 otf:gujr=rphf) (3 =) |)
140 ;; Step 3 : OTF substitutions and positionings.
145 (1 otf:gujr=~rphf,*))
147 (1 otf:gujr=~rphf,~blwf,~half,~haln,*))