1 ;; MYMR-MYAZEDI.flt -- Font Layout Table for Myanmar (Zedi font)
2 ;; Copyright (C) 2004, 2005, 2006, 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.
24 ;;; <li> MYMR-MYAZEDI.flt
26 ;;; For the Myanmar Zedi family fonts to draw Myanmar script.
28 ;;; <li> download: http://www.myazedi.com/downloads/MyaZedi_M17N.ttf
31 (font layouter mymr-myazedi nil
32 (font (nil myazedi_m17n unicode-bmp)))
35 ;; Extract syllable while detecting Kinzi, substituting subscripts,
36 ;; and removing Halants.
39 (0x1000 0x107F ?O) ; other
40 (0x1000 0x1021 ?C) ; consonant except for c, K, n, M
41 (0x1000 0x1003 ?c) ; consonant that has subscript form
42 (0x1004 ?K) ; consonant NGA
48 (0x1014 ?n) ; consonant NA
50 ;; cosonants that can be a Medial
51 (0x101A ?M) ; medial Ya
52 (0x101B ?M) ; medial Ra
53 (0x101D ?M) ; medial Wa
54 (0x101F ?M) ; medial Ha
55 (0x1021 0x102A ?I) ; independent vowel
56 (0x102C 0x1032 ?V) ; dependent Vowel
57 (0x1036 ?A) ; sign ANUSVARA
58 (0x1037 0x1038 ?S) ; other sign
59 (0x1039 ?H) ; HALANT (VIRAMA)
60 (0x200C ?N) ; ZWNJ (Zero Width Non Joiner)
61 (0x200D ?J) ; ZWJ (Zero Width Joiner)
67 ;; The following regular expression matches a graphme cluster pattern
68 ;; described in Table 10-3 of the Unicode Standard 4.0 except for
69 ;; Kinzi which is encoded by the sequence "U+1004 U+1039 U+200D".
71 ;;<-1-><---------2--------><--4--><--6---> <7->
73 ("(KHJ)([CcnKMr](H[CcnK])?)((HM)*)(V*A?H?)N?(S*)"
74 | < (1 0xE390) (2 consonant) (4 remove-halant *) (6 = *) (7 = *) > |)
76 ;; Irregular independent Kinzi
80 ;; Cluster without Kinzi
81 ("([CcnKMr](H[CcnK])?)((HM)*)(V*A?H?)N?(S*)"
82 | < (1 consonant) (3 remove-halant *) (5 = *) (6 = *) > |)
84 ;; Fixme: I'm not sure about the syllable pattern for an
89 ;; Treat anything else as a single character.
96 ((0x100B 0x1039 0x100C) 0xE10C)
97 ((0x100D 0x1039 0x100D) 0xE00D)
98 ((0x100E 0x1039 0x100D) 0xE10D)
99 ((0x100F 0x1039 0x100D) 0xE20D)
100 ((0x101E 0x1039 0x101E) 0xE01E)
101 ("(n)H([cn])" 0xE140 (2 subscript))
102 ("(.)H([cn])" (1 =) (2 subscript))
103 ("(.)H(.)" (1 =) (2 =))
107 (cond ((range 0x1000 0x101C) 0xE000)))
118 (0x1000 0x107F ?O) ; other
119 (0x1000 0x1021 ?W) ; wide consonant
120 (0x1001 0x1002 ?S) ; single-width consonant
126 (0x101A ?a) ; medial Ya
127 (0x101B ?b) ; medial Ra
128 (0x101D ?d) ; medial Wa
129 (0x101F ?f) ; medial Ha
131 (0x102D 0x102E ?V) ; dependent vowel (upper)
135 (0xE000 0xE01E ?w) ; wide subscript
136 (0xE001 0xE002 ?s) ; single-width subscript
151 (" (K)?([WSabdfws][WSKws]?[abdf][abdf]*[^ ]*) "
152 | (1 =) (2 medial = *) |)
161 ;; Medial Ya (U+101A)
162 ("(..?)adf" (1 = *) 0xE1A2)
163 ("(..?)ad" (1 = *) 0xE1A4)
164 ("(..?)af" (1 = *) 0xE1A3)
165 ("(..?)a" (1 = *) 0xE1A1)
167 ;; Medial Ra (U+101B)
168 ("([Waf]|.[Ww])bdf" 0xE1BA (1 = *))
169 ("(..?)bdf" 0xE1B9 (1 = *))
170 ("([Waf]|.[Ww])bd" 0xE1B8 (1 = *))
171 ("(..?)bd" 0xE1B7 (1 = *))
172 ("([Waf]|.[Ww])b(f)?(V)" 0xE1B6 (1 = *) (2 0xE1F3) (3 =))
173 ("(..?)b(f)?(V)" 0xE1B5 (1 = *) (2 0xE1F3) (3 =))
174 ;; Single-width consonant + a wide subscript + Medial Ra.
175 ;; To use glyph E1B4, we must shift the single-width consonant to
177 ("([Sd][Ww])b" 0xE1B4 Br>32Bl (1 = *))
178 ("([Waf].|.[Ww])b" 0xE1B4 (1 = *))
179 ("(s|..)b" 0xE1B3 (1 = *))
180 ("([Waf])b(f)?" 0xE1B2 (1 = *) (2 0xE1F3))
181 ("(.)b(f)?" 0xE1B1 (1 = *) (2 0xE1F3))
183 ;; Medial Wa (U+101D)
184 ("(..?)df" (1 = *) 0xE1D1)
185 ("(..?)d" (1 = *) 0xE01D)
187 ;; Medial Ha (U+101F)
188 ((0x100A 0x101F) 0x100A 0xE1F3)
189 ("(..?)f" (1 = *) 0xE1F1))))
192 ;; Reorder Kinzi and Vowel E. Handle Kinzi-vowel combination.
196 (0x1000 0x1021 ?C) ; Consonants except for c
197 (0x1001 0x1002 ?c) ; Consonants affecting the shape of
198 (0x1004 ?c) ; the following vowel U+102C
206 (0x102C ?A) ; Vowel AA
207 (0x102D ?i) ; Vowel I
208 (0x102E ?I) ; Vowel II
209 (0x102F ?u) ; Vowel U
210 (0x1030 ?U) ; Vowel UU
211 (0x1031 ?e) ; Vowel E
212 (0x1032 ?V) ; Vowel AI
230 (" K([CcbB]*)(e)([^ ]*) "
231 | (2 =) (1 = *) (3 kinzi-vowel = *) |)
232 (" K([CcbB]*)([^ ]*) "
233 | (1 = *) (2 kinzi-vowel = *) |)
234 (" ([CcbB]*)(e)([^ ]*) "
235 | (2 =) (1 = *) (3 = *) |)
250 ;; Various glyph substitions.
259 ;; Consonant substituion.
260 ((0x1009 0x1039) 0x1025 0x1039)
261 ((0x1009 0xE005) 0xE109 Br>5Bl 0xE005)
262 ;; ((0x101B 0x102F) 0xE01B 0x102F)
263 ;; ((0x101B 0x1030) 0xE01B 0x1030)
264 ;; ((0x1014 0x102F) 0xE140 0x102F)
265 ;; ((0x1014 0x1030) 0xE140 0x1030)
267 ;; ;; Sign substituion.
268 ;; ((0x102F 0x1037) 0x102F 0xE137)
269 ;; ((0x1030 0x1037) 0x1030 0xE137)
270 ;; ((0xE01D 0x1037) 0xE01D 0xE137)
271 ;; ((0xE1A1 0x1036 0x1037) 0xE1A1 0x1036 0xE137)
272 ;; ((0xE1A1 0x1032 0x1037) 0xE1A1 0x1032 0xE137)
273 ;; ((0xE01D 0x1032 0x1037) 0xE01D 0x1032 0xE137)
274 ;; ((0xE01D 0x1036 0x1037) 0xE01D 0x1036 0xE137)
276 ;; Vowel substituion.
277 ((0xE1F1 0x102F) 0xE1F2)
278 ((0xE1F1 0x102D 0x102F) 0xE1F2 0x102D)
279 ((0xE1F1 0x102E 0x102F) 0xE1F2 0x102E)
280 ((0xE1F1 0x1032 0x102F) 0xE1F2 0x1032)
284 ("cKA" = = Br>Bl 0xE02C)
285 ((0x1012 0xE012 0x102C 0x1039) = = 0xE02D)
286 ((0x1012 0xE01D 0x102C 0x1039) = = 0xE02D)
287 ((0x1012 0xE012 0x102C) = = 0xE02C)
288 ((0x1012 0xE01D 0x102C) = = 0xE02C)
289 ((0x102D 0x1036) 0xE2D1)
290 ("([bB][^u]*)u" (1 = *) 0xE2F1)
291 ("([bB][^u]*)U" (1 = *) 0xE2F2)
300 ;; Adjust below characters (U+102F, U+1037, etc)
306 (0x1014 ?T) ; tall consonant (substituted)
308 (0x102F 0x1030 ?B) ; below position (substitute tall one)
309 (0x1037 ?b) ; shift to right
315 (0xE2F1 0xE2F2 ?L) ; has lower part
326 (1 (cond ((0x1014) 0xE140) ((0x101B) 0xE01B)))
331 (1 =) (2 = *) (3 0xE137))
340 ;; Adjust conbination of normal consonant and wide subconsonant.
366 \[ (1 =) (2 Br>17Bl =) (3 = *))