1 ;; GUJR-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 the Gujarati script.
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 (0x0AFF ?X) ; internal use
68 ;; Step 1 : Syllable identification, Reph and base consonant movements.
72 ;; A syllable ending with a vowel sign and/or a vowel modifier.
73 ("(([CR]n?H)*[CR]n?)([mubp][Aa]?|[Aa])"
74 < | (1 move-reph-vattu) (3 = *) | >)
76 ;; Forced Halant or half form.
77 ("(([CR]n?H)*[CR]n?)(H[NJ])"
78 < | (1 move-reph-vattu) (3 = =) | >)
80 ;; A syllable without a vowel sign nor a vowel modifier.
82 < | move-reph-vattu | >)
84 ;; A syllable starting with an independent vowel.
91 ;; Move the leading RH and the Halant on the base consonant to
92 ;; appropriate positions.
93 ;; 0x0AFF indicates the destination of below-, above-, post Matras.
96 ;; Ending with Halnt. Immitate a forced Halant form.
98 (1 move-reph-vattu) (2 =) 0x200C)
100 ;; Both Reph and Vattu.
102 ("(RH)(([CR]n?H)*[CR]n?)(H)(R)$"
103 (2 = *) (5 =) (4 =) 0x0AFF (1 = =))
105 ;; A special case of above.
107 (2 =) 0x0AFF (1 = =))
109 ;; Reph but no Vattu.
110 ("(RH)(([CR]n?H)*Cn?)$"
111 (2 = *) 0x0AFF (1 = =))
113 ;; No Reph but Vattu.
114 ("(Cn?(H[CR]n?)*)(H)(R)$"
115 (1 = *) (4 =) (3 =) 0x0AFF)
117 ;; Neither Reph nor Vattu.
121 ;; Step 2 : Matra movements and OTF forms.
126 (" (RH)?([^X ]*)X(RH)?(m)?([bup])?([Aa])? "
129 (1 otf:gujr=~rphf,~blwf,*)
136 (" (RH)?([^X ]*)X(RH)?(HJ) "
144 (" (RH)?([^X ]*)X(RH)?(H)N "
146 (1 otf:gujr=~rphf,~blwf,*)
155 ;; Step 3 : OTF substitutions and positionings.
160 (1 otf:gujr=~rphf,~blwf,*))
162 (1 otf:gujr=~rphf,~blwf,~half,~haln,*))