1 ;; MYMR-MYAZEDI.flt -- Font Layout Table for Myanmar (Zedi font)
2 ;; Copyright (C) 2004, 2005, 2006
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
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
32 ;; Extract syllable while detecting Kinzi, substituting subscripts,
33 ;; and removing Halants.
36 (0x1000 0x107F ?O) ; other
37 (0x1000 0x1021 ?C) ; consonant except for c, K, n, M
38 (0x1000 0x1003 ?c) ; consonant that has subscript form
39 (0x1004 ?K) ; consonant NGA
45 (0x1014 ?n) ; consonant NA
47 ;; cosonants that can be a Medial
48 (0x101A ?M) ; medial Ya
49 (0x101B ?M) ; medial Ra
50 (0x101D ?M) ; medial Wa
51 (0x101F ?M) ; medial Ha
52 (0x1021 0x102A ?I) ; independent vowel
53 (0x102C 0x1032 ?V) ; dependent Vowel
54 (0x1036 ?A) ; sign ANUSVARA
55 (0x1037 0x1038 ?S) ; other sign
56 (0x1039 ?H) ; HALANT (VIRAMA)
57 (0x200C ?N) ; ZWNJ (Zero Width Non Joiner)
58 (0x200D ?J) ; ZWJ (Zero Width Joiner)
64 ;; The following regular expression matches a graphme cluster pattern
65 ;; described in Table 10-3 of the Unicode Standard 4.0 except for
66 ;; Kinzi which is encoded by the sequence "U+1004 U+1039 U+200D".
68 ;;<-1-><---------2--------><--4--><--6---> <7->
70 ("(KHJ)([CcnKMr](H[CcnK])?)((HM)*)(V*A?H?)N?(S*)"
71 | < (1 0xE390) (2 consonant) (4 remove-halant *) (6 = *) (7 = *) > |)
73 ;; Irregular independent Kinzi
77 ;; Cluster without Kinzi
78 ("([CcnKMr](H[CcnK])?)((HM)*)(V*A?H?)N?(S*)"
79 | < (1 consonant) (3 remove-halant *) (5 = *) (6 = *) > |)
81 ;; Fixme: I'm not sure about the syllable pattern for an
86 ;; Treat anything else as a single character.
93 ((0x100B 0x1039 0x100C) 0xE10C)
94 ((0x100D 0x1039 0x100D) 0xE00D)
95 ((0x100E 0x1039 0x100D) 0xE10D)
96 ((0x100F 0x1039 0x100D) 0xE20D)
97 ((0x101E 0x1039 0x101E) 0xE01E)
98 ("(n)H([cn])" 0xE140 (2 subscript))
99 ("(.)H([cn])" (1 =) (2 subscript))
100 ("(.)H(.)" (1 =) (2 =))
104 (cond ((range 0x1000 0x101C) 0xE000)))
115 (0x1000 0x107F ?O) ; other
116 (0x1000 0x1021 ?W) ; wide consonant
117 (0x1001 0x1002 ?S) ; single-width consonant
123 (0x101A ?a) ; medial Ya
124 (0x101B ?b) ; medial Ra
125 (0x101D ?d) ; medial Wa
126 (0x101F ?f) ; medial Ha
128 (0x102D 0x102E ?V) ; dependent vowel (upper)
132 (0xE000 0xE01E ?w) ; wide subscript
133 (0xE001 0xE002 ?s) ; single-width subscript
148 (" (K)?([WSabdfws][WSKws]?[abdf][abdf]*[^ ]*) "
149 | (1 =) (2 medial = *) |)
158 ;; Medial Ya (U+101A)
159 ("(..?)adf" (1 = *) 0xE1A2)
160 ("(..?)ad" (1 = *) 0xE1A4)
161 ("(..?)af" (1 = *) 0xE1A3)
162 ("(..?)a" (1 = *) 0xE1A1)
164 ;; Medial Ra (U+101B)
165 ("([Waf]|.[Ww])bdf" 0xE1BA (1 = *))
166 ("(..?)bdf" 0xE1B9 (1 = *))
167 ("([Waf]|.[Ww])bd" 0xE1B8 (1 = *))
168 ("(..?)bd" 0xE1B7 (1 = *))
169 ("([Waf]|.[Ww])b(f)?(V)" 0xE1B6 (1 = *) (2 0xE1F3) (3 =))
170 ("(..?)b(f)?(V)" 0xE1B5 (1 = *) (2 0xE1F3) (3 =))
171 ;; Single-width consonant + a wide subscript + Medial Ra.
172 ;; To use glyph E1B4, we must shift the single-width consonant to
174 ("([Sd][Ww])b" 0xE1B4 Br>32Bl (1 = *))
175 ("([Waf].|.[Ww])b" 0xE1B4 (1 = *))
176 ("(s|..)b" 0xE1B3 (1 = *))
177 ("([Waf])b(f)?" 0xE1B2 (1 = *) (2 0xE1F3))
178 ("(.)b(f)?" 0xE1B1 (1 = *) (2 0xE1F3))
180 ;; Medial Wa (U+101D)
181 ("(..?)df" (1 = *) 0xE1D1)
182 ("(..?)d" (1 = *) 0xE01D)
184 ;; Medial Ha (U+101F)
185 ((0x100A 0x101F) 0x100A 0xE1F3)
186 ("(..?)f" (1 = *) 0xE1F1))))
189 ;; Reorder Kinzi and Vowel E. Handle Kinzi-vowel combination.
193 (0x1000 0x1021 ?C) ; Consonants except for c
194 (0x1001 0x1002 ?c) ; Consonants affecting the shape of
195 (0x1004 ?c) ; the following vowel U+102C
203 (0x102C ?A) ; Vowel AA
204 (0x102D ?i) ; Vowel I
205 (0x102E ?I) ; Vowel II
206 (0x102F ?u) ; Vowel U
207 (0x1030 ?U) ; Vowel UU
208 (0x1031 ?e) ; Vowel E
209 (0x1032 ?V) ; Vowel AI
227 (" K([CcbB]*)(e)([^ ]*) "
228 | (2 =) (1 = *) (3 kinzi-vowel = *) |)
229 (" K([CcbB]*)([^ ]*) "
230 | (1 = *) (2 kinzi-vowel = *) |)
231 (" ([CcbB]*)(e)([^ ]*) "
232 | (2 =) (1 = *) (3 = *) |)
247 ;; Various glyph substitions.
256 ;; Consonant substituion.
257 ((0x1009 0x1039) 0x1025 0x1039)
258 ((0x1009 0xE005) 0xE109 Br>5Bl 0xE005)
259 ;; ((0x101B 0x102F) 0xE01B 0x102F)
260 ;; ((0x101B 0x1030) 0xE01B 0x1030)
261 ;; ((0x1014 0x102F) 0xE140 0x102F)
262 ;; ((0x1014 0x1030) 0xE140 0x1030)
264 ;; ;; Sign substituion.
265 ;; ((0x102F 0x1037) 0x102F 0xE137)
266 ;; ((0x1030 0x1037) 0x1030 0xE137)
267 ;; ((0xE01D 0x1037) 0xE01D 0xE137)
268 ;; ((0xE1A1 0x1036 0x1037) 0xE1A1 0x1036 0xE137)
269 ;; ((0xE1A1 0x1032 0x1037) 0xE1A1 0x1032 0xE137)
270 ;; ((0xE01D 0x1032 0x1037) 0xE01D 0x1032 0xE137)
271 ;; ((0xE01D 0x1036 0x1037) 0xE01D 0x1036 0xE137)
273 ;; Vowel substituion.
274 ((0xE1F1 0x102F) 0xE1F2)
275 ((0xE1F1 0x102D 0x102F) 0xE1F2 0x102D)
276 ((0xE1F1 0x102E 0x102F) 0xE1F2 0x102E)
277 ((0xE1F1 0x1032 0x102F) 0xE1F2 0x1032)
281 ("cKA" = = Br>Bl 0xE02C)
282 ((0x1012 0xE012 0x102C 0x1039) = = 0xE02D)
283 ((0x1012 0xE01D 0x102C 0x1039) = = 0xE02D)
284 ((0x1012 0xE012 0x102C) = = 0xE02C)
285 ((0x1012 0xE01D 0x102C) = = 0xE02C)
286 ((0x102D 0x1036) 0xE2D1)
287 ("([bB][^u]*)u" (1 = *) 0xE2F1)
288 ("([bB][^u]*)U" (1 = *) 0xE2F2)
297 ;; Adjust below characters (U+102F, U+1037, etc)
303 (0x1014 ?T) ; tall consonant (substituted)
305 (0x102F 0x1030 ?B) ; below position (substitute tall one)
306 (0x1037 ?b) ; shift to right
312 (0xE2F1 0xE2F2 ?L) ; has lower part
323 (1 (cond ((0x1014) 0xE140) ((0x101B) 0xE01B)))
328 (1 =) (2 = *) (3 0xE137))
337 ;; Adjust conbination of normal consonant and wide subconsonant.
363 \[ (1 =) (2 Br>17Bl =) (3 = *))