1 ;; SINH-OTF.flt -- Font Layout Table for Sinhala OpenType fonts
2 ;; Copyright (C) 2004, 2005
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 Sinhala OpenType fonts to draw Sinhala.
27 ;;; A Font is available from <http://sinhala.linux.lk/>.
30 ;; V : independent vowels
33 ;; H : AL-LAKUNA (virama)
34 ;; m : pre-consonant vowel signs
35 ;; b : below-consonant vowel signs
36 ;; u : above-consonant vowel signs
37 ;; p : post-consonant vowel signs
40 ;; s : KOMBUVA HAA AELA-PILLA
41 ;; t : two-part vowel sign
42 ;; a : AVUSVARAYA & VISARGAYA
44 ;; J : ZERO WIDTH JOINER
66 ;; Step 0 : Syllable identification
71 ;; A syllable containing a completely decomposed two-part vowel sign.
72 ("(C(HJ[CR])*)(m(H|qH?|r)a?)"
73 < | (1 otf:sinh=akhn,vatu,pres) (3 = *) | >)
75 ;; A syllable containing KOMBUVA HAA AELA-PILLA.
76 ("(C(HJ[CR])*)(s)(H)?(a)?"
77 < | (1 otf:sinh=akhn,vatu,pres) (3 two-part) (4 =) (5 =) | >)
79 ;; A syllable with a two-part vowel sign.
80 ("(C(HJ[CR])*)(t)(a)?"
81 < | (1 otf:sinh=akhn,vatu,pres) (3 two-part) (4 =) | >)
83 ;; A syllable with a vowel sign and/or a various sign.
84 ("(C(HJ[CR])*)([mMbupqr]a?|a)"
85 < | (1 otf:sinh=akhn,vatu,pres) (3 = *) | >)
89 < | otf:sinh=akhn,vatu,pres | >)
91 ;; Suppress repaya explicitly.
95 < | (1 =) (2 two-part) (3 =) (4 =) | >)
97 < | (1 =) (2 two-part) (3 =) | >)
103 ;; Independent vowels.
110 ;; Split two-part dependent vowel signs for canonicalisation.
113 ((0x0DDA) 0x0DD9 0x0DCA)
114 ((0x0DDC) 0x0DD9 0x0DCF)
115 ((0x0DDD) 0x0DD9 0x0DCF 0x0DCA)
116 ((0x0DDE) 0x0DD9 0x0DDF)))
119 ;; Step 1 : Move pre-consonant signs.
124 (" ([^ mMbupqr]+)(m|M)?(b)?(u)?(p)?(q)?(r)?(H)?(a)? "
125 | (2 =) (1 = *) (3 =) (4 =) (5 =) (6 =) (7 =) (8 =) (9 =) |)
129 ;; Step 2 : OTF substitutions.