1 ;; MYMR-MYAZEDI.flt -- Font Layout Table for Myanmar (Zedi font)
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 and K
38 (0x1000 0x1003 ?c) ; consonant that has subscript form
39 (0x1004 ?K) ; consonant NGA
43 (0x1014 ?n) ; consonant NA
45 (0x101A ?M) ; cosonant that may be used as Medial
46 (0x101B ?r) ; Medial Ra
49 (0x1021 0x102A ?I) ; independent vowel
50 (0x102C 0x1032 ?V) ; dependent Vowel
51 (0x1036 ?A) ; sign ANUSVARA
52 (0x1037 0x1038 ?S) ; other sign
53 (0x1039 ?H) ; HALANT (VIRAMA)
54 (0x200C ?N) ; ZWNJ (Zero Width Non Joiner)
60 ;; Special case for Medial Ra: don't use Kinzi for this pattern.
61 ("(K)(Hr(HM)*)(V*A?H?)N?(S*)"
62 | < (1 =) (2 remove-halant *) (4 = *) (5 = *) > |)
64 ;; The following regular expression matches a syllable pattern
65 ;; described in Table 10-3 of the Unicode Standard 4.0 .
66 ;;<1-> <--------2--------><--4--><--6---> <7->
68 ("(KH)?([CcnKMr](H[CcnK])?)((H[Mr])*)(V*A?H?)N?(S*)"
69 | < (1 0xE390) (2 consonant) (4 remove-halant *) (6 = *) (7 = *) > |)
71 ;; Fixme: I'm not sure about the syllable pattern for an
76 ;; Treat anything else as a single character.
83 ((0x100B 0x1039 0x100C) 0xE10C)
84 ((0x100D 0x1039 0x100D) 0xE00D)
85 ((0x100E 0x1039 0x100D) 0xE10D)
86 ((0x100F 0x1039 0x100D) 0xE20D)
87 ((0x101E 0x1039 0x101E) 0xE01E)
88 ("(n)H([cn])" 0xE140 (2 subscript))
89 ("(.)H([cn])" (1 =) (2 subscript))
90 ("(.)H(.)" (1 =) (2 =))
94 (cond ((range 0x1000 0x101c) 0xE000)))
105 (0x1000 0x107F ?O) ; other
106 (0x1000 0x1021 ?W) ; wide consonant
107 (0x1001 0x1002 ?S) ; single-width consonant
113 (0x101A ?a) ; medial Ya
114 (0x101B ?b) ; medial Ra
115 (0x101D ?d) ; medial Wa
116 (0x101F ?f) ; medial Ha
118 (0x102D 0x102E ?V) ; dependent vowel (upper)
122 (0xE000 0xE01E ?w) ; wide subscript
123 (0xE001 0xE002 ?s) ; single-width subscript
138 (" (K)?([WSabdfws][WSKws]?[abdf][abdf]*[^ ]*) "
139 | (1 =) (2 medial = *) |)
148 ;; Medial Ya (U+101A)
149 ("(..?)adf" (1 = *) 0xE1A2)
150 ("(..?)ad" (1 = *) 0xE1A4)
151 ("(..?)af" (1 = *) 0xE1A3)
152 ("(..?)a" (1 = *) 0xE1A1)
154 ;; Medial Ra (U+101B)
155 ("([Waf]|.[Ww])bdf" 0xE1BA (1 = *))
156 ("(..?)bdf" 0xE1B9 (1 = *))
157 ("([Waf]|.[Ww])bd" 0xE1B8 (1 = *))
158 ("(..?)bd" 0xE1B7 (1 = *))
159 ("([Waf]|.[Ww])b(f)?(V)" 0xE1B6 (1 = *) (2 0xE1F3) (3 =))
160 ("(..?)b(f)?(V)" 0xE1B5 (1 = *) (2 0xE1F3) (3 =))
161 ;; Single-width consonant + a wide subscript + Medial Ra.
162 ;; To use glyph E1B4, we must shift the single-width consonant to
164 ("([Sd][Ww])b" 0xE1B4 Br>32Bl (1 = *))
165 ("([Waf].|.[Ww])b" 0xE1B4 (1 = *))
166 ("(s|..)b" 0xE1B3 (1 = *))
167 ("([Waf])b(f)?" 0xE1B2 (1 = *) (2 0xE1F3))
168 ("(.)b(f)?" 0xE1B1 (1 = *) (2 0xE1F3))
170 ;; Medial Wa (U+101D)
171 ("(..?)df" (1 = *) 0xE1D1)
172 ("(..?)d" (1 = *) 0xE01D)
174 ;; Medial Ha (U+101F)
175 ((0x100A 0x101F) 0x100A 0xE1F3)
176 ("(..?)f" (1 = =) 0xE1F1))))
179 ;; Reorder Kinzi and Vowel E. Handle Kinzi-vowel combination.
183 (0x1000 0x1021 ?C) ; Consonants except for c
184 (0x1001 0x1002 ?c) ; Consonants affecting the shape of
185 (0x1004 ?c) ; the following vowel U+102C
193 (0x102C ?A) ; Vowel AA
194 (0x102D ?i) ; Vowel I
195 (0x102E ?I) ; Vowel II
196 (0x102F ?u) ; Vowel U
197 (0x1030 ?U) ; Vowel UU
198 (0x1031 ?e) ; Vowel E
199 (0x1032 ?V) ; Vowel AI
214 (" K([CcbB]*)(e)([^ ]*) "
215 | (2 =) (1 = *) (3 kinzi-vowel = *) |)
216 (" K([CcbB]*)([^ ]*) "
217 | (1 = *) (2 kinzi-vowel = *) |)
218 (" ([CcbB]*)(e)([^ ]*) "
219 | (2 =) (1 = *) (3 = *) |)
234 ;; Various glyph substitions.
242 ;; Consonant substituion.
243 ((0x1009 0x1039) 0xE009 0x1039)
244 ((0x1009 0xE005) 0xE109 0xE005)
245 ((0x101B 0x102F) 0xE01B 0x102F)
248 ((0x1014 0x1037) 0x1014 0xE037)
249 ((0x101B 0x1037) 0x101B 0xE137)
251 ;; Vowel substituion.
252 ((0xE1F1 0x102F) 0xE1F2)
256 ("cKA" = = Br>Bl 0xE02C)
257 ((0x1012 0xE012 0x102C 0x1039) = = 0xE02D)
258 ((0x1012 0xE01D 0x102C 0x1039) = = 0xE02D)
259 ((0x1012 0xE012 0x102C) = = 0xE02C)
260 ((0x1012 0xE01D 0x102C) = = 0xE02C)
261 ((0x102D 0x1036) 0xE2D1)
262 ("([bB][^u]*)u" (1 = *) 0xE2F1)
263 ("([bB][^u]*)U" (1 = *) 0xE2F2)
266 ((0x200C) 0x4E tc.cc 0x48)