1 ;; MYMR-MYAZEDI.flt -- Font Layout Table for Myanmar (Zedi font)
2 ;; Copyright (C) 2004, 2005, 2006, 2007, 2008 AIST (H15PRO112)
3 ;; See the end for copying conditions.
5 (font layouter mymr-myazedi nil
6 (font (nil myazedi_m17n unicode-bmp)))
8 ;;; <li> MYMR-MYAZEDI.flt
10 ;;; For the Myanmar Zedi family fonts to draw Myanmar script.
12 ;;; <li> download: http://www.myazedi.com/downloads/MyaZedi_M17N.ttf
16 ;; Extract syllable while detecting Kinzi, substituting subscripts,
17 ;; and removing Halants.
20 (0x1000 0x107F ?O) ; other
21 (0x1000 0x1021 ?C) ; consonant except for c, K, n, M
22 (0x1000 0x1003 ?c) ; consonant that has subscript form
23 (0x1004 ?K) ; consonant NGA
29 (0x1014 ?n) ; consonant NA
31 ;; cosonants that can be a Medial
32 (0x101A ?M) ; medial Ya
33 (0x101B ?M) ; medial Ra
34 (0x101D ?M) ; medial Wa
35 (0x101F ?M) ; medial Ha
36 (0x1021 0x102A ?I) ; independent vowel
37 (0x102C 0x1032 ?V) ; dependent Vowel
38 (0x1036 ?A) ; sign ANUSVARA
39 (0x1037 0x1038 ?S) ; other sign
40 (0x1039 ?H) ; HALANT (VIRAMA)
41 (0x200C ?N) ; ZWNJ (Zero Width Non Joiner)
42 (0x200D ?J) ; ZWJ (Zero Width Joiner)
48 ;; The following regular expression matches a graphme cluster pattern
49 ;; described in Table 10-3 of the Unicode Standard 4.0 except for
50 ;; Kinzi which is encoded by the sequence "U+1004 U+1039 U+200D".
52 ;;<-1-><---------2--------><--4--><--6---><7-><8->
54 ("(KHJ)([CcnKMr](H[CcnK])?)((HM)*)(V*A?H?)(N)?(S*)"
55 | < (1 0xE390) (2 consonant) (4 remove-halant *) (6 = *) (7) (8 = *) > |)
57 ;; Irregular independent Kinzi
61 ;; Cluster without Kinzi
62 ("([CcnKMr](H[CcnK])?)((HM)*)(V*A?H?)(N)?(S*)"
63 | < (1 consonant) (3 remove-halant *) (5 = *) (6) (7 = *) > |)
65 ;; Fixme: I'm not sure about the syllable pattern for an
70 ;; Treat anything else as a single character.
77 ((0x100B 0x1039 0x100C) 0xE10C)
78 ((0x100D 0x1039 0x100D) 0xE00D)
79 ((0x100E 0x1039 0x100D) 0xE10D)
80 ((0x100F 0x1039 0x100D) 0xE20D)
81 ((0x101E 0x1039 0x101E) 0xE01E)
82 ("(n)H([cn])" 0xE140 (2 subscript))
83 ("(.)H([cn])" (1 =) (2 subscript))
84 ("(.)H(.)" (1 =) (2 =))
88 (cond ((range 0x1000 0x101C) 0xE000)))
99 (0x1000 0x107F ?O) ; other
100 (0x1000 0x1021 ?W) ; wide consonant
101 (0x1001 0x1002 ?S) ; single-width consonant
107 (0x101A ?a) ; medial Ya
108 (0x101B ?b) ; medial Ra
109 (0x101D ?d) ; medial Wa
110 (0x101F ?f) ; medial Ha
112 (0x102D 0x102E ?V) ; dependent vowel (upper)
116 (0xE000 0xE01E ?w) ; wide subscript
117 (0xE001 0xE002 ?s) ; single-width subscript
132 (" (K)?([WSabdfws][WSKws]?[abdf][abdf]*[^ ]*) "
133 | (1 =) (2 medial = *) |)
142 ;; Medial Ya (U+101A)
143 ("(..?)adf" (1 = *) 0xE1A2)
144 ("(..?)ad" (1 = *) 0xE1A4)
145 ("(..?)af" (1 = *) 0xE1A3)
146 ("(..?)a" (1 = *) 0xE1A1)
148 ;; Medial Ra (U+101B)
149 ("([Waf]|.[Ww])bdf" 0xE1BA (1 = *))
150 ("(..?)bdf" 0xE1B9 (1 = *))
151 ("([Waf]|.[Ww])bd" 0xE1B8 (1 = *))
152 ("(..?)bd" 0xE1B7 (1 = *))
153 ("([Waf]|.[Ww])b(f)?(V)" 0xE1B6 (1 = *) (2 0xE1F3) (3 =))
154 ("(..?)b(f)?(V)" 0xE1B5 (1 = *) (2 0xE1F3) (3 =))
155 ;; Single-width consonant + a wide subscript + Medial Ra.
156 ;; To use glyph E1B4, we must shift the single-width consonant to
158 ("([Sd][Ww])b" 0xE1B4 Br>32Bl (1 = *))
159 ("([Waf].|.[Ww])b" 0xE1B4 (1 = *))
160 ("(s|..)b" 0xE1B3 (1 = *))
161 ("([Waf])b(f)?" 0xE1B2 (1 = *) (2 0xE1F3))
162 ("(.)b(f)?" 0xE1B1 (1 = *) (2 0xE1F3))
164 ;; Medial Wa (U+101D)
165 ("(..?)df" (1 = *) 0xE1D1)
166 ("(..?)d" (1 = *) 0xE01D)
168 ;; Medial Ha (U+101F)
169 ((0x100A 0x101F) 0x100A 0xE1F3)
170 ("(..?)f" (1 = *) 0xE1F1))))
173 ;; Reorder Kinzi and Vowel E. Handle Kinzi-vowel combination.
177 (0x1000 0x1021 ?C) ; Consonants except for c
178 (0x1001 0x1002 ?c) ; Consonants affecting the shape of
179 (0x1004 ?c) ; the following vowel U+102C
187 (0x102C ?A) ; Vowel AA
188 (0x102D ?i) ; Vowel I
189 (0x102E ?I) ; Vowel II
190 (0x102F ?u) ; Vowel U
191 (0x1030 ?U) ; Vowel UU
192 (0x1031 ?e) ; Vowel E
193 (0x1032 ?V) ; Vowel AI
211 (" K([CcbB]*)(e)([^ ]*) "
212 | (2 =) (1 = *) (3 kinzi-vowel = *) |)
213 (" K([CcbB]*)([^ ]*) "
214 | (1 = *) (2 kinzi-vowel = *) |)
215 (" ([CcbB]*)(e)([^ ]*) "
216 | (2 =) (1 = *) (3 = *) |)
231 ;; Various glyph substitions.
240 ;; Consonant substituion.
241 ((0x1009 0x1039) 0x1025 0x1039)
242 ((0x1009 0xE005) 0xE109 Br>5Bl 0xE005)
243 ;; ((0x101B 0x102F) 0xE01B 0x102F)
244 ;; ((0x101B 0x1030) 0xE01B 0x1030)
245 ;; ((0x1014 0x102F) 0xE140 0x102F)
246 ;; ((0x1014 0x1030) 0xE140 0x1030)
248 ;; ;; Sign substituion.
249 ;; ((0x102F 0x1037) 0x102F 0xE137)
250 ;; ((0x1030 0x1037) 0x1030 0xE137)
251 ;; ((0xE01D 0x1037) 0xE01D 0xE137)
252 ;; ((0xE1A1 0x1036 0x1037) 0xE1A1 0x1036 0xE137)
253 ;; ((0xE1A1 0x1032 0x1037) 0xE1A1 0x1032 0xE137)
254 ;; ((0xE01D 0x1032 0x1037) 0xE01D 0x1032 0xE137)
255 ;; ((0xE01D 0x1036 0x1037) 0xE01D 0x1036 0xE137)
257 ;; Vowel substituion.
258 ((0xE1F1 0x102F) 0xE1F2)
259 ((0xE1F1 0x102D 0x102F) 0xE1F2 0x102D)
260 ((0xE1F1 0x102E 0x102F) 0xE1F2 0x102E)
261 ((0xE1F1 0x1032 0x102F) 0xE1F2 0x1032)
265 ("cKA" = = Br>Bl 0xE02C)
266 ((0x1012 0xE012 0x102C 0x1039) = = 0xE02D)
267 ((0x1012 0xE01D 0x102C 0x1039) = = 0xE02D)
268 ((0x1012 0xE012 0x102C) = = 0xE02C)
269 ((0x1012 0xE01D 0x102C) = = 0xE02C)
270 ((0x102D 0x1036) 0xE2D1)
271 ("([bB][^u]*)u" (1 = *) 0xE2F1)
272 ("([bB][^u]*)U" (1 = *) 0xE2F2)
281 ;; Adjust below characters (U+102F, U+1037, etc)
287 (0x1014 ?T) ; tall consonant (substituted)
289 (0x102F 0x1030 ?B) ; below position (substitute tall one)
290 (0x1037 ?b) ; shift to right
296 (0xE2F1 0xE2F2 ?L) ; has lower part
307 (1 (cond ((0x1014) 0xE140) ((0x101B) 0xE01B)))
312 (1 =) (2 = *) (3 0xE137))
321 ;; Adjust conbination of normal consonant and wide subconsonant.
347 \[ (1 =) (2 Br>17Bl =) (3 = *))
354 ;; Copyright (C) 2004, 2005, 2006, 2007
355 ;; National Institute of Advanced Industrial Science and Technology (AIST)
356 ;; Registration Number H15PRO112
358 ;; This file is part of the m17n database; a sub-part of the m17n
361 ;; The m17n library is free software; you can redistribute it and/or
362 ;; modify it under the terms of the GNU Lesser General Public License
363 ;; as published by the Free Software Foundation; either version 2.1 of
364 ;; the License, or (at your option) any later version.
366 ;; The m17n library is distributed in the hope that it will be useful,
367 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
368 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
369 ;; Lesser General Public License for more details.
371 ;; You should have received a copy of the GNU Lesser General Public
372 ;; License along with the m17n library; if not, write to the Free
373 ;; Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
374 ;; Boston, MA 02110-1301, USA.