1 ;; GURU-OTF.flt -- Font Layout Table for Gurmukhi OpenType fonts
2 ;; Copyright (C) 2004, 2007, 2008, 2010 AIST (H15PRO112)
3 ;; See the end for copying conditions.
5 (font layouter guru-otf nil
7 (font (nil nil unicode-bmp :otf=guru)))
11 ;;; For Gurmukhi OpenType fonts to draw the Gurmukhi script.
14 ;; B: consonants that have a below form
15 ;; C: consonants that do not
16 (0x0A00 0x0A7F ?X) ; generic
17 (0x0A01 0x0A02 ?a) ; SIGN ADAK BINDI .. BINDI
18 (0x0A03 ?A) ; SIGN VISARGA
19 (0x0A05 0x0A14 ?V) ; LETTER A .. AU
20 (0x0A15 0x0A38 ?C) ; LETTER KA .. SA
21 (0x0A2F ?Y) ; LETTER YA
22 (0x0A30 ?B) ; LETTER RA
23 (0x0A35 ?B) ; LETTER VA
24 (0x0A39 ?B) ; LETTER HA
25 (0x0A3C ?n) ; SIGN NUKTA
26 (0x0A3E ?p) ; VOWEL SIGN AA
27 (0x0A3F ?m) ; VOWEL SIGN I
28 (0x0A40 ?p) ; VOWEL SIGN II
29 (0x0A41 0x0A42 ?b) ; VOWEL SIGN U .. UU
30 (0x0A47 0x0A4C ?u) ; VOWEL SIGN EE .. AU
31 (0x0A4D ?H) ; SIGN VIRAMA
32 ;; (0x0A51 ?) ; SIGN UDAAT
33 (0x0A59 0x0A5E ?C) ; LETTER KHHA .. FA
36 ;; (0x0A75 ?) ; SIGN YAKASH
40 (0x25CC ?X) ; DOTTED CIRCLE
50 ;; Compose a consonant and a nukta
51 ((0x0A32 0x0A3C) 0x0A33)
52 ((0x0A38 0x0A3C) 0x0A36)
53 ((0x0A16 0x0A3C) 0x0A59)
54 ((0x0A17 0x0A3C) 0x0A5A)
55 ((0x0A1C 0x0A3C) 0x0A5B)
56 ((0x0A2B 0x0A3C) 0x0A5E)
61 ;; Syllable identification
65 ;; Consonant-based syllables
67 ("([CBY]n?((J?H|HJ?)[CBY]n?)*)(H[NJ]?|m?u?b?p?n?a?A?)"
70 (".+HJ$" :otf=guru=nukt,akhn+)
71 ("(.+)(H)N?$" (1 :otf=guru=nukt,akhn+) (2 =) 0x200C)
72 (".+" :otf=guru=nukt,akhn+))
75 ;; Syllables with an independent vowel
76 ("(Vn?)((J?H[BY])?m?u?b?p?n?a?A?)"
77 < | (1 :otf=guru=nukt+) (2 = *) | >)
79 ;; Combining marks are displayed with a DOTTED CIRCLE.
82 ((font-facility 0x25CC) < = 0x25CC >)
86 ((font-facility 0x25CC) < 0x25CC = >)
89 ;; Isolated blwf and pstf are displayed with a DOTTED CIRCLE in the
92 < | (1 =) (3 =) (2 =) | >)
98 ;; Reorder halant for blwf and pstf
102 ;; Isolated blwf and pstf
103 ;; Saab.ttf uses vatu instead of blwf.
106 ((font-facility 0x25CC) < 0x25CC (1 :otf=guru=blwf,pstf,vatu+) >)
107 (" J([BYR]H) " [ (1 :otf=guru=blwf,pstf,vatu+) ])))
109 ;; Syllables with an overt halant
111 | (1 reorder) (2 = =) |)
113 ;; Ordinary syllables
114 (" ([^mubpaA ]+)(m?u?b?p?n?a?A?) "
115 | (1 reorder) (2 = *) |)
121 ("(.|.+([^YJ]|JY|HJ))((J?HY)*)$"
122 (1 reorder-B *) (3 reorder-Y *)))
136 ;; Language forms and matra reordering
140 ;; Overt halant forms
142 | (1 b4post) (1 post) (2 = =) |)
146 (" ([^mubpaA ]*)(mn?)?(un?)?(bn?)?(pn?)?(a)?(A)? "
147 | (2 = *) (1 b4post) (4 = *) (3 = *) (6 =) (1 post) (5 = *) (7 =) |)
156 (2 ("(.|.+([^YH]|JY|BH))((YH)*)$" (1 lang-forms *))))
157 ("(.|.+([^YH]|JY|BH))((YH)*)"
162 ("(.H)J" (1 :otf=guru=half+))
163 (".H" :otf=guru=blwf,half,vatu+)
167 ("(.|.+([^YH]|JY|BH))((YH)+)$"
168 ;; lohit_pa.ttf uses psts instead of pstf for YA.
169 (3 :otf=guru=pstf+psts)))
173 ;; Final reordering (Move pre-base matra after the last halant)
178 (" (mn?)([^ ]+HJ?)([^H ]+) "
179 | (2 = *) (1 = *) (3 = *) |)
185 ;; Nukta for matra and Presentation forms
190 ;; lohit_pa.ttf uses vatu instead of blws.
191 | (1 :otf=guru=nukt,vatu,pres,abvs,blws,psts,haln+) |)
212 (1 :otf=guru=+abvm,blwm,dist))
217 ;; Copyright (C) 2004, 2007, 2008, 2010
218 ;; National Institute of Advanced Industrial Science and Technology (AIST)
219 ;; Registration Number H15PRO112
221 ;; This file is part of the m17n database; a sub-part of the m17n
224 ;; The m17n library is free software; you can redistribute it and/or
225 ;; modify it under the terms of the GNU Lesser General Public License
226 ;; as published by the Free Software Foundation; either version 2.1 of
227 ;; the License, or (at your option) any later version.
229 ;; The m17n library is distributed in the hope that it will be useful,
230 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
231 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
232 ;; Lesser General Public License for more details.
234 ;; You should have received a copy of the GNU Lesser General Public
235 ;; License along with the m17n library; if not, write to the Free
236 ;; Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
237 ;; Boston, MA 02110-1301, USA.