1 ;; SINH-OTF.flt -- Font Layout Table for Sinhala OpenType fonts
2 ;; Copyright (C) 2004, 2005, 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 Sinhala OpenType fonts to draw Sinhala.
27 ;;; A Font is available from <http://sinhala.linux.lk/>.
29 (font layouter sinh-otf nil
30 (font (nil nil unicode-bmp :otf=sinh=akhn)))
33 ;; V : independent vowels
35 ;; H : AL-LAKUNA (virama)
38 ;; b : below-consonant vowel signs
39 ;; u : above-consonant vowel signs
40 ;; p : post-consonant vowel signs
43 ;; s : KOMBUVA HAA AELA-PILLA
44 ;; t : two-part vowel sign
45 ;; a : AVUSVARAYA & VISARGAYA
47 ;; J : ZERO WIDTH JOINER
68 ;; Step 0 : Syllable identification
73 ;; A syllable containing a completely decomposed two-part vowel sign.
74 ("(C(HJ[CR])*)(m(H|qH?|r)a?)"
75 < | (1 otf:sinh=akhn,vatu,pres) (3 = *) | >)
77 ;; A syllable containing KOMBUVA HAA AELA-PILLA.
78 ("(C(HJ[CR])*)(s)(H)?(a)?"
79 < | (1 otf:sinh=akhn,vatu,pres) (3 two-part) (4 =) (5 =) | >)
81 ;; A syllable with a two-part vowel sign.
82 ("(C(HJ[CR])*)(t)(a)?"
83 < | (1 otf:sinh=akhn,vatu,pres) (3 two-part) (4 =) | >)
85 ;; A syllable with a vowel sign and/or a various sign.
86 ("(C(HJ[CR])*)([mMbupqr]a?|a)"
87 < | (1 otf:sinh=akhn,vatu,pres) (3 = *) | >)
91 < | otf:sinh=akhn,vatu,pres | >)
93 ;; Independent vowels.
100 ;; Split two-part dependent vowel signs for canonicalisation.
103 ((0x0DDA) 0x0DD9 0x0DCA)
104 ((0x0DDC) 0x0DD9 0x0DCF)
105 ((0x0DDD) 0x0DD9 0x0DCF 0x0DCA)
106 ((0x0DDE) 0x0DD9 0x0DDF)))
109 ;; Step 1 : Move pre-consonant signs.
114 (" ([^ mMbupqr]+)(m|M)?(b)?(u)?(p)?(q)?(r)?(H)?(a)? "
115 | (2 =) (1 = *) (3 =) (4 =) (5 =) (6 =) (7 =) (8 =) (9 =) |)
119 ;; Step 2 : OTF substitutions.