1 ;; ORYA-OTF.flt -- Font Layout Table for Oriya OpenType font
2 ;; Copyright (C) 2004, 2007
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., 51 Franklin Street, Fifth Floor,
22 ;; Boston, MA 02110-1301, USA.
26 ;;; For Oriya OpenType fonts to draw the Oriya script.
28 (font layouter orya-otf nil
29 (font (nil nil unicode-bmp :otf=orya=rphf)))
32 ;; C: consonant (except for R, B and Y)
34 ;; B: consonant (below)
35 ;; Y: consonant (post)
38 ;; m: vowel sign (pre)
39 ;; u: vowel sign (above)
40 ;; b: vowel sign (below)
41 ;; p: vowel sign (post)
42 ;; t: vowel sign (two-part)
43 ;; A: vowel modifier (above)
44 ;; a: vowel modifier (post)
45 ;; V: independent vowel
46 ;; N: ZWNJ (ZERO WIDTH NON-JOINER)
47 ;; J: ZWJ (ZERO WIDTH JOINER)
50 (0x0B00 0x0B7F ?X) ; generic
51 (0x0B00 ?Z) ; internal use
52 (0x0B01 0x0B03 ?a) ; SIGN CANDRABINDU .. VISARGA
53 (0x0B05 0x0B14 ?V) ; LETTER A .. VOCALIC AU
54 (0x0B15 0x0B39 ?C) ; LETTER KA .. HA
55 (0x0B24 ?B) ; LETTER TA
56 (0x0B28 ?B) ; LETTER NA
57 (0x0B2C 0x0B2E ?B) ; LETTER BA .. MA
58 (0x0B2F ?Y) ; LETTER YA
59 (0x0B30 ?R) ; LETTER RA
60 (0x0B32 0x0B33 ?B) ; LETTER LA
61 (0x0B33 ?B) ; LETTER LLA
62 (0x0B3C ?n) ; SIGN NUKTA
63 (0x0B3E ?p) ; VOWEL SIGN AA
64 (0x0B3F ?u) ; VOWEL SIGN I
65 (0x0B40 ?p) ; VOWEL SIGN II
66 (0x0B41 0x0B43 ?b) ; VOWEL SIGN U .. VOCALIC R
67 (0x0B47 ?m) ; VOWEL SIGN E
68 (0x0B48 0x0B4C ?t) ; VOWEL SIGN AI .. AU
69 (0x0B4D ?H) ; SIGN VIRAMA
70 (0x0B56 ?u) ; AI LENGTH MARK
71 (0x0B57 ?p) ; AU LENGTH MARK
72 (0x0B5C 0x0B5D ?C) ; LETTER RRA .. RHA
73 (0x0B5F ?Y) ; LETTER YYA
74 (0x0B60 0x0B61 ?V) ; LETTER VOCALIC RR .. LL
75 (0x0B71 ?C) ; LETTER WA
76 (0x0B64 0x0B65 ?X) ; DANDA .. DOUBLE DANDA
84 ;; Decompose two-part vowel signs.
91 ;; Compose consonant and nukta.
96 ;; Move ZWJ before the consonant.
102 ;; Syllable identification and reordering.
103 ;; Do not apply 'rphf' if a syllable begins with a ZWJ.
107 ;; A syllable with a ZWJ and a pre-base vowel sign.
109 ("(J)(([CRBY]n?H)*[CRBY]n?)(m)(u)?(p)?(a)?"
110 < | (1 =) (4 =) (2 pre-below) (5 =) (2 post) (6 =) (7 =) | >)
112 ;; A syllable with a ZWJ and a non-pre-base vowel sign.
114 ("(J)(([CRBY]n?H)*[CRBY]n?)(([bu])|(p))(a)?"
115 < | (1 =) (2 pre-below) (5 =) (2 post) (6 =) (7 =) | >)
117 ;; A syllable with a ZWJ and a vowel modifier, but without vowel signs.
119 ("(J)(([CRBY]n?H)*[CRBY]n?)(a)"
120 < | (1 =) (2 pre-below) (2 post) (4 =) | >)
122 ;; Add a ZWNJ explicitly when a syllable ends with a halant.
124 ("(J)(([CRBY]n?H)*[CRBY]n?)(HN?)?"
125 < | (1 =) (2 pre-below) (4 = 0x200C) (2 post) | >)
127 ;; With a pre-base vowel sign, without a ZWJ.
129 ("(RH)?(([CRBY]n?H)*[CRBY]n?)(m)(u)?(p)?(a)?"
131 (4 =) (2 pre-below) (5 =) (1 otf:orya=rphf) (2 post) (6 =) (7 =)
134 ;; With a non-pre-base vowel sign, without a ZWJ.
136 ("(RH)?(([CRBY]n?H)*[CRBY]n?)(([bu])|(p))(a)?"
137 < | (2 pre-below) (5 =) (1 otf:orya=rphf) (2 post) (6 =) (7 =) | >)
139 ;; With a vowel modifier, without vowel signs and a ZWJ.
141 ("(RH)?(([CRBY]n?H)*[CRBY]n?)(a)"
142 < | (2 pre-below) (1 otf:orya=rphf) (2 post) (4 =) | >)
144 ;; Add a ZWNJ explicitly when a syllable ends with a halant.
146 ("(RH)?(([CRBY]n?H)*[CRBY]n?)(HN?)?"
147 < | (2 pre-below) (1 otf:orya=rphf) (4 = 0x200C) (2 post) | >)
149 ;; A syllable starting with an independent vowel.
156 ;; Move a halant after the base consonant to the end.
157 ;; Fill the resulting gap with a special mark.
158 ;; Remove post-base parts.
161 ("([CRBYnH]*[CYn])H([RBH]+)[YH]+$"
162 (1 = *) 0x0B00 (2 = *))
163 ("([CRBYnH]*[CYn])(H)([RBH]+)$"
164 (1 = *) 0x0B00 (3 = *) (2 =))
165 ("([CRBYnH]*[Cn])[YH]*$"
167 ("([RB]n?)H([RBH]*)[YH]+$"
168 (1 = *) 0x0B00 (2 = *))
169 ("([RB]n?)(H)([RBH]*)$"
170 (1 = *) 0x0B00 (3 = *) (2 =))
174 ;; Extract post-base parts and add a halant at the end.
175 ;; Produce nothing if there are no post-base parts.
178 ("[CRBYnH]*[CRBn]H([YH]+)$"
186 ;; Apply language forms to concerning segments.
190 ;; If a syllable contains a ZWNJ, render the final halant explicitly.
191 (" ([^Z]+)(Z)([^N]*)(HN)([^ ]*) "
192 | (1 otf:orya=nukt,akhn,half,pres+) (2 =) (3 otf:orya=blwf+) (4 = =)
193 (5 otf:orya=pstf+) |)
195 (" (J?m?)([^Z]+)(Z)([^ ]*) "
196 | (1 = *) (2 otf:orya=nukt,akhn,half,pres+) (3 =) (4 otf:orya=blwf,pstf+) |)
201 ;; When the number of glyphs between a pre-base vowel sign and the
202 ;; post-base mark is more than one, move the pre-base vowel sign
203 ;; before the final glyph.
207 (" (J)?(m)([^Z]+)([^Z])Z([^N ]*)N?([^ ]*) "
208 | (1 =) (3 = *) (2 =) (4 =) (5 = *) (6 = *)|)
209 (" ([^Z]+)Z([^N ]*)N?([^ ]*) "
210 | (1 = *) (2 = *) (3 = *) |)
214 ;; Apply other features.
215 ;; Do not apply 'vatu' and 'blws' if there is a ZWJ.
216 ;; The 'pres' feature is applied again for pre-base vowel sign.
221 (1 otf:orya=pres,abvs,pstp,haln+abvm,blwm,dist))
223 (1 otf:orya=vatu,pres,abvs,blws,pstp,haln+abvm,blwm,dist))