1 ;; GURU-OTF.flt -- Font Layout Table for Gurmukhi OpenType fonts
2 ;; Copyright (C) 2004, 2007, 2008 AIST (H15PRO112)
3 ;; See the end for copying conditions.
5 (font layouter guru-otf nil
6 (font (nil nil unicode-bmp :otf=guru=blwf)))
10 ;;; For Gurmukhi OpenType fonts to draw the Gurmukhi script.
13 ;; C: general consonant (except for R and Y)
14 ;; R: consonant (below)
18 ;; m: vowel sign (pre)
19 ;; u: vowel sign (above)
20 ;; b: vowel sign (below)
21 ;; p: vowel sign (post)
22 ;; A: vowel modifier (above)
23 ;; a: vowel modifier (post)
24 ;; V: independent vowel
26 ;; N: ZWNJ (ZERO WIDTH NON-JOINER)
27 ;; J: ZWJ (ZERO WIDTH JOINER)
30 (0x0A00 0x0A7F ?X) ; generic
31 (0x0A00 ?Z) ; internal use
32 (0x0A01 0x0A02 ?A) ; SIGN ADAK BINDI .. BINDI
33 (0x0A03 ?a) ; SIGN VISARGA
34 (0x0A05 0x0A14 ?V) ; LETTER A .. AU
35 (0x0A15 0x0A38 ?C) ; LETTER KA .. SA
36 (0x0A2F ?Y) ; LETTER YA
37 (0x0A30 ?R) ; LETTER RA
38 (0x0A35 ?R) ; LETTER VA
39 (0x0A39 ?R) ; LETTER HA
40 (0x0A3C ?n) ; SIGN NUKTA
41 (0x0A3E ?p) ; VOWEL SIGN AA
42 (0x0A3F ?m) ; VOWEL SIGN I
43 (0x0A40 ?p) ; VOWEL SIGN II
44 (0x0A41 0x0A42 ?b) ; VOWEL SIGN U .. UU
45 (0x0A47 0x0A4C ?u) ; VOWEL SIGN EE .. AU
46 (0x0A4D ?H) ; SIGN VIRAMA
47 ;; (0x0A51 ?) ; SIGN UDAAT
48 (0x0A59 0x0A5E ?C) ; LETTER KHHA .. FA
51 ;; (0x0A75 ?) ; SIGN YAKASH
52 (0x0964 0x0965 ?X) ; DANDA .. DOUBLE DANDA
57 ;; Compose consonant and nukta
61 ((0x0A32 0x0A3C) 0x0A33)
62 ((0x0A38 0x0A3C) 0x0A36)
63 ((0x0A16 0x0A3C) 0x0A59)
64 ((0x0A17 0x0A3C) 0x0A5A)
65 ((0x0A1C 0x0A3C) 0x0A5B)
66 ((0x0A2B 0x0A3C) 0x0A5E)
74 ;; A syllable with vowel signs.
76 ("([CRY]n?(H[CRY]n?)*)((m)|(ub?|b)|(p))(A?a?d?)"
77 < | (4 =) (1 pre-below) (5 = *) (1 post) (6 =) (7 = *) | >)
79 ;; A syllable with vowel modifiers or an Addak.
81 ("([CRY]n?(H[CRY]n?)*)(Aa?d?|ad?|d)"
82 < | (1 pre-below) (1 post) (3 = *) | >)
84 ;; Add a ZWNJ explicitly when a syllable ends with a halant.
86 ("([CRY]n?(H[CRY]n?)*)(HN?)?"
87 < | (1 pre-below) (3 = 0x200C) (1 post) | >)
89 ;; A syllable starting with an independent vowel.
90 ;; In older texts, LETTER OO may followed by VOWEL SIGN U.
97 ;; Move the halant after the base consonant to the end.
98 ;; Fill the resulting gap with a special mark.
99 ;; Remove post-base parts.
103 (1 = *) 0x0A00 (3 =) (2 =))
109 ;; Extract post-base parts and add a halant at the end.
110 ;; Produce nothing if there are no post-base parts.
118 ;; Apply language forms to concerning segments. Note that the Saab
119 ;; font generates below form with 'vatu' instead of 'blwf'.
125 (" ([^Z]+)Z(RH)?(H)N(YH)? "
126 | (1 otf:guru=nukt+) (2 otf:guru=blwf,vatu+) (3 =) (4 otf:guru=pstf+) |)
128 ;; Vowel signs and vowel modifiers.
130 (" (m)?([^Z]+)Z(RH)?(u?b?)(YH)?(p?A?a?d?) "
131 | (1 =) (2 otf:guru=nukt+) (3 otf:guru=blwf,vatu+) (4 = *)
132 (5 otf:guru=pstf+) (6 = *) |)
142 (1 otf:guru=vatu,pres,abvs,blws,psts,haln+abvm,blwm,dist))
148 ;; Copyright (C) 2004, 2007, 2008
149 ;; National Institute of Advanced Industrial Science and Technology (AIST)
150 ;; Registration Number H15PRO112
152 ;; This file is part of the m17n database; a sub-part of the m17n
155 ;; The m17n library is free software; you can redistribute it and/or
156 ;; modify it under the terms of the GNU Lesser General Public License
157 ;; as published by the Free Software Foundation; either version 2.1 of
158 ;; the License, or (at your option) any later version.
160 ;; The m17n library is distributed in the hope that it will be useful,
161 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
162 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
163 ;; Lesser General Public License for more details.
165 ;; You should have received a copy of the GNU Lesser General Public
166 ;; License along with the m17n library; if not, write to the Free
167 ;; Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
168 ;; Boston, MA 02110-1301, USA.