diff options
| -rw-r--r-- | lisp/language/devan-util.el | 886 | ||||
| -rw-r--r-- | lisp/language/devanagari.el | 9 | ||||
| -rw-r--r-- | lisp/language/indian.el | 29 |
3 files changed, 516 insertions, 408 deletions
diff --git a/lisp/language/devan-util.el b/lisp/language/devan-util.el index c490bf612fd..1e6a4c9d447 100644 --- a/lisp/language/devan-util.el +++ b/lisp/language/devan-util.el | |||
| @@ -19,15 +19,18 @@ | |||
| 19 | ;; GNU General Public License for more details. | 19 | ;; GNU General Public License for more details. |
| 20 | 20 | ||
| 21 | ;; You should have received a copy of the GNU General Public License | 21 | ;; You should have received a copy of the GNU General Public License |
| 22 | ;; along with GNU Emacs; see the file COPYING. If not, write to the | 22 | ;; along with GNU Emacs; see the file COPYING. If not, write to |
| 23 | ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 23 | ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. |
| 24 | ;; Boston, MA 02111-1307, USA. | ||
| 25 | 24 | ||
| 26 | ;;; Commentary: | 25 | ;;; Commentary: |
| 27 | 26 | ||
| 28 | ;; History: | 27 | ;; History: |
| 29 | ;; 1996.10.18 written by KAWABATA, Taichi <kawabata@is.s.u-tokyo.ac.jp> | 28 | ;; 1996.10.18 written by KAWABATA, Taichi <kawabata@is.s.u-tokyo.ac.jp> |
| 30 | ;; 1997.1.20 fixed some bugs. | 29 | ;; 1997.1.20 fixed some bugs. |
| 30 | ;; 1997.3.24 fixed some bugs. | ||
| 31 | |||
| 32 | ;; Future work :: | ||
| 33 | ;; Decompose the input characters and process them on the character basis. | ||
| 31 | 34 | ||
| 32 | ;; Devanagari script composition rules and related programs. | 35 | ;; Devanagari script composition rules and related programs. |
| 33 | 36 | ||
| @@ -37,6 +40,9 @@ | |||
| 37 | ;;; Steps toward composition of Devanagari Characters. | 40 | ;;; Steps toward composition of Devanagari Characters. |
| 38 | ;;; | 41 | ;;; |
| 39 | 42 | ||
| 43 | ;;; Intersection Function will be used. | ||
| 44 | (require 'cl) | ||
| 45 | |||
| 40 | ;;; Basic functions. | 46 | ;;; Basic functions. |
| 41 | 47 | ||
| 42 | ;;;###autoload | 48 | ;;;###autoload |
| @@ -65,7 +71,8 @@ | |||
| 65 | (save-restriction | 71 | (save-restriction |
| 66 | (narrow-to-region from to) | 72 | (narrow-to-region from to) |
| 67 | (goto-char (point-min)) | 73 | (goto-char (point-min)) |
| 68 | (while (re-search-forward "\\cd" nil t) | 74 | ; (while (re-search-forward "\\cd" nil t) |
| 75 | (while (re-search-forward "." nil t) | ||
| 69 | (let* ((devanagari-char (indian-to-devanagari (preceding-char)))) | 76 | (let* ((devanagari-char (indian-to-devanagari (preceding-char)))) |
| 70 | (delete-char -1) | 77 | (delete-char -1) |
| 71 | (insert devanagari-char))))) | 78 | (insert devanagari-char))))) |
| @@ -77,7 +84,8 @@ | |||
| 77 | (save-restriction | 84 | (save-restriction |
| 78 | (narrow-to-region from to) | 85 | (narrow-to-region from to) |
| 79 | (goto-char (point-min)) | 86 | (goto-char (point-min)) |
| 80 | (while (re-search-forward "\\cD" nil t) ; Devanagari Character Code. | 87 | ; (while (re-search-forward "\\cD" nil t) ; Devanagari Character Code. |
| 88 | (while (re-search-forward "." nil t) | ||
| 81 | (let* ((indian-char (devanagari-to-indian (preceding-char)))) | 89 | (let* ((indian-char (devanagari-to-indian (preceding-char)))) |
| 82 | (delete-char -1) | 90 | (delete-char -1) |
| 83 | (insert indian-char))))) | 91 | (insert indian-char))))) |
| @@ -117,25 +125,27 @@ | |||
| 117 | ;; H - Halant($(5!h(B) or Virama | 125 | ;; H - Halant($(5!h(B) or Virama |
| 118 | ;; V - Vowel ($(5!$!%!&!'!(!)!*!+!,!-!.!/!0!1!2#&#'#*(B) | 126 | ;; V - Vowel ($(5!$!%!&!'!(!)!*!+!,!-!.!/!0!1!2#&#'#*(B) |
| 119 | ;; ("$(5#&#'#*(B" can be obtained by IS13194 vowels with nukta.) | 127 | ;; ("$(5#&#'#*(B" can be obtained by IS13194 vowels with nukta.) |
| 120 | ;; D - Vowel Modifiers, i.e. Anuswar, Chandrabindu, Visarga ($(5!!!"!#(B) | 128 | ;; D - Vowel Modifiers, i.e. Anuswar, Chandrabindu ($(5!!!"(B) |
| 129 | ;; (Visaraga ($(5!#(B) is excluded.) | ||
| 121 | ;; M - Matra ($(5!Z![!\!]!^!_!`!a!b!c!d!e!f!g#K#L#M(B) | 130 | ;; M - Matra ($(5!Z![!\!]!^!_!`!a!b!c!d!e!f!g#K#L#M(B) |
| 122 | ;; ("$(5#K#L#M(B" can be obtained by IS13194 matras with nukta.) | 131 | ;; ("$(5#K#L#M(B" can be obtained by IS13194 matras with nukta.) |
| 123 | ;; | 132 | ;; |
| 124 | ;; In Emacs, one syllable of Indian language is considered to be one | 133 | ;; In Emacs, one syllable of Indian language is considered to be one |
| 125 | ;; composite glyph. If we expand the above expression, it would be: | 134 | ;; composite glyph. If we expand the above expression for |
| 135 | ;; cons-vowel-syllable, it would be: | ||
| 126 | ;; | 136 | ;; |
| 127 | ;; [[C [N] H] [C [N] H] [C [N] H] C [N] H] C [N] [M] [D] | V [D] | 137 | ;; [[C [N] H] [C [N] H] [C [N] H] C [N] H] C [N] [M] [D] |
| 128 | ;; | 138 | ;; |
| 129 | ;; Therefore, in worst case, the consonant syllabe will consist of | 139 | ;; Therefore, in worst case, the one syllable may contain |
| 130 | ;; following characters. | 140 | ;; following characters. |
| 131 | ;; | 141 | ;; |
| 132 | ;; C N H C N H C N H C N H C N M D | 142 | ;; C N H C N H C N H C N H C N M D |
| 133 | ;; | 143 | ;; |
| 134 | ;; The example is a sanskrit word "kaurtsnya", where five consecutive | 144 | ;; The example is a sanskrit word "kArtsnya", where five consecutive |
| 135 | ;; consonant appears. | 145 | ;; consonants appear. |
| 136 | ;; | 146 | ;; |
| 137 | ;; On the other hand, incomplete consonant syllable before inputting | 147 | ;; On the other hand, consonant-syllable, which appears at the end of |
| 138 | ;; base consonant must satisfy the following condition: | 148 | ;; the word, would have the following expression: |
| 139 | ;; | 149 | ;; |
| 140 | ;; [C [N] H] [C [N] H] [C [N] H] C [N] H | 150 | ;; [C [N] H] [C [N] H] [C [N] H] C [N] H |
| 141 | ;; | 151 | ;; |
| @@ -151,18 +161,47 @@ | |||
| 151 | ;; | 161 | ;; |
| 152 | ;; However, to make editing possible even in this condition, we will | 162 | ;; However, to make editing possible even in this condition, we will |
| 153 | ;; not consider about this case. | 163 | ;; not consider about this case. |
| 154 | 164 | ;; | |
| 155 | (defconst devanagari-cons-syllable-examine | 165 | ;; Note: |
| 156 | "\\(\\([$(5!3(B-$(5!X(B]$(5!i(B?$(5!h(B\\)?\\([$(5!3(B-$(5!X(B]$(5!i(B?$(5!h(B\\)?[$(5!3(B-$(5!X(B]$(5!i(B?$(5!h(B\\)?[$(5!3(B-$(5!X(B]$(5!i(B?\\([$(5!Z(B-$(5!g#K#L#M(B]\\|\\($(5!_!i(B\\)\\|\\($(5![!i(B\\)\\|\\($(5!\!i(B\\)\\)?[$(5!!!"!#(B]?" | 166 | ;; Currently, it seems that the only following consonants would have |
| 157 | "Regexp matching to one Devanagari consonant syllable.") | 167 | ;; Nukta sign attatched. |
| 158 | 168 | ;; ($(5!3!4!5!:!?!@!I(B) | |
| 159 | (defconst devanagari-cons-syllable-incomplete-examine | 169 | ;; Therefore, [$(5!3(B-$(5!X(B]$(5!i(B? can be re-written as |
| 160 | "\\([$(5!3(B-$(5!X(B]$(5!i(B?$(5!h(B\\)?\\([$(5!3(B-$(5!X(B]$(5!i(B?$(5!h(B\\)?\\([$(5!3(B-$(5!X(B]$(5!i(B?$(5!h(B\\)?[$(5!3(B-$(5!X(B]$(5!i(B?$(5!h(B$" | 170 | ;; \\([$(5!3!4!5!:!?!@!I(B]$(5!i(B\\)\\|[$(5!3(B-$(5!X(B] |
| 161 | "Regexp matching to one Devanagari incomplete consonant syllable.") | 171 | |
| 162 | 172 | (defconst devanagari-full-cons | |
| 163 | (defconst devanagari-vowel-syllable-examine | 173 | "\\(\\([$(5!3!4!5!:!?!@!I(B]$(5!i(B\\)\\|[$(5!3(B-$(5!X$.$E"%(B]\\)" |
| 164 | "\\([$(5!$(B-$(5!2#&#'#*(B]\\|\\($(5!*!i(B\\)\\|\\($(5!&!i(B\\)\\|\\($(5!'!i(B\\)\\)[$(5!!!"!#(B]?" | 174 | "Devanagari full consonant") |
| 165 | "Regexp matching to one Devanagari vowel syllable.") | 175 | |
| 176 | (defconst devanagari-pure-cons | ||
| 177 | (concat "\\(" devanagari-full-cons "$(5!h(B\\)") | ||
| 178 | "Devanagari pure consonant") | ||
| 179 | |||
| 180 | (defconst devanagari-matra | ||
| 181 | "\\(\\([$(5!_![!\(B]$(5!i(B\\)\\|[$(5!Z(B-$(5!g#K#L#M(B]\\)" | ||
| 182 | "Devanagari Matra Signs. '$(5#K#L#M(B' can also be created from the combination | ||
| 183 | of '$(5!_![!\(B' and nukta sign.") | ||
| 184 | |||
| 185 | (defconst devanagari-vowel | ||
| 186 | "\\(\\([$(5!*!&!'(B]$(5!i(B\\)\\|[$(5!$(B-$(5!2#&#'#*(B]\\)" | ||
| 187 | "Devanagari Vowels. '$(5#&#'#*(B' can also be created from the combination | ||
| 188 | of '$(5!*!&!'(B' and nukta sign.") | ||
| 189 | |||
| 190 | (defconst devanagari-vowel-syllable | ||
| 191 | (concat devanagari-vowel "[$(5!!!"(B]?") | ||
| 192 | "Devanagari vowel syllable.") | ||
| 193 | |||
| 194 | (defconst devanagari-cons-syllable | ||
| 195 | (concat devanagari-pure-cons "?" devanagari-pure-cons "?" | ||
| 196 | devanagari-pure-cons "?" devanagari-pure-cons "$") | ||
| 197 | "Devanagari consonant syllable") | ||
| 198 | |||
| 199 | (defconst devanagari-cons-vowel-syllable | ||
| 200 | (concat "\\(" | ||
| 201 | devanagari-pure-cons "?" devanagari-pure-cons "?" | ||
| 202 | devanagari-pure-cons "?" devanagari-pure-cons "\\)?" | ||
| 203 | devanagari-full-cons devanagari-matra "?[$(5!!!"(B]?") | ||
| 204 | "Devanagari consonant vowel syllable.") | ||
| 166 | 205 | ||
| 167 | ;; | 206 | ;; |
| 168 | ;; Also, digits and virams should be processed other than syllables. | 207 | ;; Also, digits and virams should be processed other than syllables. |
| @@ -170,17 +209,18 @@ | |||
| 170 | ;; In IS 13194, Avagrah is obtained by Nukta after Viram, and | 209 | ;; In IS 13194, Avagrah is obtained by Nukta after Viram, and |
| 171 | ;; OM is obtained by Nukta after Chandrabindu | 210 | ;; OM is obtained by Nukta after Chandrabindu |
| 172 | ;; | 211 | ;; |
| 173 | (defconst devanagari-digit-viram-examine | 212 | |
| 174 | "[$(5!q(B-$(5!z!j(B]") | 213 | (defconst devanagari-digit-viram-visarga |
| 175 | (defconst devanagari-other-sign-examine | 214 | "[$(5!q(B-$(5!z!j!#(B]") |
| 215 | (defconst devanagari-other-sign | ||
| 176 | "\\([$(5!!!j(B]$(5!i(B\\)\\|\\([$(5#!#J(B]\\)") | 216 | "\\([$(5!!!j(B]$(5!i(B\\)\\|\\([$(5#!#J(B]\\)") |
| 177 | 217 | ||
| 178 | (defconst devanagari-composite-glyph-unit-examine | 218 | (defconst devanagari-composite-glyph-unit |
| 179 | (concat "\\(" devanagari-cons-syllable-incomplete-examine | 219 | (concat "\\(" devanagari-cons-syllable |
| 180 | "\\)\\|\\(" devanagari-vowel-syllable-examine | 220 | "\\)\\|\\(" devanagari-vowel-syllable |
| 181 | "\\)\\|\\(" devanagari-digit-viram-examine | 221 | "\\)\\|\\(" devanagari-digit-viram-visarga |
| 182 | "\\)\\|\\(" devanagari-cons-syllable-examine | 222 | "\\)\\|\\(" devanagari-cons-vowel-syllable |
| 183 | "\\)\\|\\(" devanagari-other-sign-examine"\\)") | 223 | "\\)\\|\\(" devanagari-other-sign "\\)") |
| 184 | "Regexp matching to Devanagari string to be composed form one glyph.") | 224 | "Regexp matching to Devanagari string to be composed form one glyph.") |
| 185 | 225 | ||
| 186 | ;;(put-charset-property charset-devanagari-1-column | 226 | ;;(put-charset-property charset-devanagari-1-column |
| @@ -190,13 +230,13 @@ | |||
| 190 | 230 | ||
| 191 | ;; Sample | 231 | ;; Sample |
| 192 | ;; | 232 | ;; |
| 193 | ;;(string-match devanagari-cons-syllable-examine "$(5!X" . "$(5",(B") | ||
| 243 | ("\\($(5!O!^(B\\)" . "$(5"-(B") | ||
| 244 | ("\\($(5!P!](B\\)" . "$(5".(B") | ||
| 245 | ("\\($(5!P!^(B\\)" . "$(5"/(B") | ||
| 246 | 281 | ||
| 247 | ;; `r' at the top of syllable and followed by other consonants. | 282 | ;; `r' at the top of syllable and followed by other consonants. |
| 248 | ;; ("[^$(5!h(B]\\($(5!O!h(B\\)[$(5!3(B-$(5!X(B]" . "$(5"p(B") | 283 | ;; ("[^$(5!h(B]\\($(5!O!h(B\\)[$(5!3(B-$(5!X(B]" "$(5"p(B") |
| 249 | ("^\\($(5!O!h(B\\)[$(5!3(B-$(5!X(B]" . "$(5"p(B") | 284 | ("^\\($(5!O!h(B\\)[$(5!3(B-$(5!X(B]" "$(5"p(B") |
| 250 | |||
| 251 | ;; Half Form Ligature | ||
| 252 | ;; Here is the half-form ligature which has higher priority than | ||
| 253 | ;; the common ligature rules listed below. | ||
| 254 | ;; special forms. | ||
| 255 | ("\\($(5!3!h!V!h(B\\)[$(5!3(B-$(5!X(B]" . "$(5"l(B") | ||
| 256 | ("\\($(5!:!h!<!h(B\\)[$(5!3(B-$(5!X(B]" . "$(5"m(B") | ||
| 257 | ;; Ordinary forms. | ||
| 258 | ("\\($(5!B!h!B!h(B\\)[$(5!3(B-$(5!X(B]" . "$(5"c(B") | ||
| 259 | ("\\($(5!F!h!F!h(B\\)[$(5!3(B-$(5!X(B]" . "$(5"k(B") | ||
| 260 | |||
| 261 | ;; If "r" is preceded by the vowel-suppressed consonant | ||
| 262 | ;; (especially those with vertical line), it will be written as | ||
| 263 | ;; slanted line below the preceding consonant character. Some of | ||
| 264 | ;; them are pre-composed as one glyph. | ||
| 265 | |||
| 266 | ("\\($(5!:!i!h!O(B\\)" . "$(5"!(B") | ||
| 267 | ("\\($(5!I!i!h!O(B\\)" . "$(5""(B") | ||
| 268 | ("\\($(5!3!h!O(B\\)" . "$(5"#(B") | ||
| 269 | ("\\($(5!5!h!O(B\\)" . "$(5"$(B") | ||
| 270 | ("\\($(5!B!h!O(B\\)" . "$(5"%(B") | ||
| 271 | ("\\($(5!H!h!O(B\\)" . "$(5"&(B") | ||
| 272 | ("\\($(5!I!h!O(B\\)" . "$(5"'(B") | ||
| 273 | ("\\($(5!U!h!O(B\\)" . "$(5")(B") | ||
| 274 | |||
| 275 | ;; Special Rules | ||
| 276 | ;; In the following case, "$(5!<!h!:(B" ligature does not occur. | ||
| 277 | ("\\($(5!<!h(B\\)$(5!:!h!<!h(B" . "$(5"<(B") | ||
| 278 | 285 | ||
| 279 | ;; Ligature Rules | 286 | ;; Ligature Rules |
| 280 | ("\\($(5!3!h!B!h!O!h!M(B\\)" . "$(5$!(B") | 287 | ("\\($(5!3!h!B!h!O!h!M(B\\)" "$(5$!(B" sanskrit) |
| 281 | ("\\($(5!3!h!B!h!T(B\\)" . "$(5$"(B") | 288 | ("\\($(5!3!h!B!h!T(B\\)" "$(5$"(B" sanskrit) |
| 282 | ("\\($(5!3!h!B!h!M(B\\)" . "$(5$#(B") | 289 | ("\\($(5!3!h!B!h!M(B\\)" "$(5$#(B" sanskrit) |
| 283 | ("\\($(5!3!h!F!h!M(B\\)" . "$(5$$(B") | 290 | ("\\($(5!3!h!F!h!M(B\\)" "$(5$$(B") |
| 284 | ("\\($(5!3!h!O!h!M(B\\)" . "$(5$%(B") | 291 | ("\\($(5!3!h!O!h!M(B\\)" "$(5$%(B") |
| 285 | ("\\($(5!3!h!T!h!M(B\\)" . "$(5$&(B") | 292 | ("\\($(5!3!h!O(B\\)" "$(5"#(B") ; Post "r" |
| 286 | ("\\($(5!3!h!3(B\\)" . "$(5$'(B") | 293 | ("\\($(5!3!h!T!h!M(B\\)" "$(5$&(B" sanskrit) |
| 287 | ("\\($(5!3!h!B(B\\)" . "$(5$((B") | 294 | ("\\($(5!3!h(B\\)$(5!3!h(B[$(5!3(B-$(5!N!P(B-$(5!X(B]" "$(5"3(B") ; Special Half Form |
| 288 | ("\\($(5!3!h!F(B\\)" . "$(5$)(B") | 295 | ("\\($(5!3!h!3(B\\)" "$(5$'(B") |
| 289 | ("\\($(5!3!h!L(B\\)" . "$(5$*(B") | 296 | ("\\($(5!3!h(B\\)$(5!B!h!O(B" "$(5"3(B") ; Special Rules for "k-tr" |
| 290 | ("\\($(5!3!h!M(B\\)" . "$(5$+(B") | 297 | ("\\($(5!3!h!B(B\\)" "$(5$((B") |
| 291 | ("\\($(5!3!h!Q(B\\)" . "$(5$,(B") | 298 | ("\\($(5!3!h!F(B\\)" "$(5$)(B") |
| 292 | ("\\($(5!3!h!T(B\\)" . "$(5$-(B") | 299 | ("\\($(5!3!h!L(B\\)" "$(5$*(B") |
| 293 | ("\\($(5!3!h!V(B\\)" . "$(5$.(B") | 300 | ("\\($(5!3!h!M(B\\)" "$(5$+(B") |
| 294 | ("\\($(5!6!h!F(B\\)" . "$(5$/(B") | 301 | ("\\($(5!3!h!Q(B\\)" "$(5$,(B") |
| 295 | ("\\($(5!7!h!3!h!B!h!M(B\\)" . "$(5$0(B") | 302 | ("\\($(5!3!h!T(B\\)" "$(5$-(B") |
| 296 | ("\\($(5!7!h!3!h!V!h!T(B\\)" . "$(5$1(B") | 303 | ("\\($(5!3!h!V!h(B\\)[$(5!3(B-$(5!N!P(B-$(5!X(B]" "$(5"l(B") ; Half Form |
| 297 | ("\\($(5!7!h!3!h!B(B\\)" . "$(5$2(B") | 304 | ("\\($(5$.!h(B\\)[$(5!3(B-$(5!N!P(B-$(5!X(B]" "$(5"l(B") ; Half Form |
| 298 | ("\\($(5!7!h!3!h!V(B\\)" . "$(5$3(B") | 305 | ("\\($(5!3!h!V(B\\)" "$(5$.(B") |
| 299 | ("\\($(5!7!h!6!h!O(B\\)" . "$(5$4(B") | 306 | ("\\($(5!3!h(B\\)[$(5!3(B-$(5!N!P(B-$(5!X(B]" "$(5"3(B") ; Half Form |
| 300 | ("\\($(5!7!h!3!h!M(B\\)" . "$(5$5(B") | 307 | ("\\($(5!3!i!h(B\\)[$(5!3(B-$(5!N!P(B-$(5!X(B]" "$(5"s(B") ; Nukta Half Form |
| 301 | ("\\($(5!7!h!4!h!M(B\\)" . "$(5$6(B") | 308 | ("\\($(5!3!i(B\\)" "$(5#3(B") ; Nukta |
| 302 | ("\\($(5!7!h!5!h!M(B\\)" . "$(5$7(B") | 309 | ("\\($(5!4!h(B\\)[$(5!3(B-$(5!N!P(B-$(5!X(B]" "$(5"4(B") ; Half Form |
| 303 | ("\\($(5!7!h!6!h!M(B\\)" . "$(5$8(B") | 310 | ("\\($(5!4!i!h(B\\)[$(5!3(B-$(5!N!P(B-$(5!X(B]" "$(5"t(B") ; Nukta Half Form |
| 304 | ("\\($(5!7!h!3(B\\)" . "$(5$9(B") | 311 | ("\\($(5!4!i(B\\)" "$(5#4(B") ; Nukta |
| 305 | ("\\($(5!7!h!4(B\\)" . "$(5$:(B") | 312 | ("\\($(5!5!h!O!h(B\\)[$(5!3(B-$(5!N!P(B-$(5!X(B]" "$(5"`(B") ; Half Form |
| 306 | ("\\($(5!7!h!5(B\\)" . "$(5$;(B") | 313 | ("\\($(5!5!h!O(B\\)" "$(5"$(B") ; Post "r" |
| 307 | ("\\($(5!7!h!6(B\\)" . "$(5$<(B") | 314 | ("\\($(5!5!h(B\\)[$(5!3(B-$(5!N!P(B-$(5!X(B]" "$(5"5(B") ; Half Form |
| 308 | ("\\($(5!7!h!7(B\\)" . "$(5$=(B") | 315 | ("\\($(5!5!i!h(B\\)[$(5!3(B-$(5!N!P(B-$(5!X(B]" "$(5"u(B") ; Nukta Half Form |
| 309 | ("\\($(5!7!h!F(B\\)" . "$(5$>(B") | 316 | ("\\($(5!5!i(B\\)" "$(5#5(B") ; Nukta |
| 310 | ("\\($(5!7!h!L(B\\)" . "$(5$?(B") | 317 | ("\\($(5!6!h!F!h(B\\)[$(5!3(B-$(5!N!P(B-$(5!X(B]" "$(5"a(B") ; Half Form |
| 311 | ("\\($(5!7!h!M(B\\)" . "$(5$@(B") | 318 | ("\\($(5!6!h!F(B\\)" "$(5$/(B") |
| 312 | ("\\($(5!8!h!8(B\\)" . "$(5$A(B") | 319 | ; Slot |
| 313 | ("\\($(5!8!h!<(B\\)" . "$(5$B(B") | 320 | ("\\($(5!6!h!O(B\\)" "$(5!6"q(B") ; Post "r" |
| 314 | ("\\($(5!9!h!M(B\\)" . "$(5$C(B") | 321 | ("\\($(5!6!h(B\\)[$(5!3(B-$(5!N!P(B-$(5!X(B]" "$(5"6(B") ; Half Form |
| 315 | ("\\($(5!:!h!O(B\\)" . "$(5$D(B") | 322 | ("\\($(5!7!h!3!h!B!h!M(B\\)" "$(5$0(B" sanskrit) |
| 316 | ("\\($(5!:!h!<(B\\)" . "$(5$E(B") | 323 | ("\\($(5!7!h!3!h!V!h!T(B\\)" "$(5$1(B" sanskrit) |
| 317 | ("\\($(5!<!h!8(B\\)" . "$(5$F(B") | 324 | ("\\($(5!7!h!3!h!B(B\\)" "$(5$2(B" sanskrit) |
| 318 | ("\\($(5!<!h!:(B\\)" . "$(5$G(B") | 325 | ("\\($(5!7!h!3!h!V(B\\)" "$(5$3(B" sanskrit) |
| 319 | ("\\($(5!=!h!3(B\\)" . "$(5$H(B") | 326 | ("\\($(5!7!h!3!h!O(B\\)" "$(5$9"q(B") ; Special Rule. May be precomposed font needed. |
| 320 | ("\\($(5!=!h!=(B\\)" . "$(5$I(B") | 327 | ("\\($(5!7!h!6!h!O(B\\)" "$(5$4(B" sanskrit) |
| 321 | ("\\($(5!=!h!>(B\\)" . "$(5$J(B") | 328 | ("\\($(5!7!h!3!h!M(B\\)" "$(5$5(B" sanskrit) |
| 322 | ("\\($(5!=!h!M(B\\)" . "$(5$K(B") | 329 | ("\\($(5!7!h!4!h!M(B\\)" "$(5$6(B" sanskrit) |
| 323 | ("\\($(5!>!h!M(B\\)" . "$(5$L(B") | 330 | ("\\($(5!7!h!5!h!M(B\\)" "$(5$7(B" sanskrit) |
| 324 | ("\\($(5!?!h!5!h!M(B\\)" . "$(5$M(B") | 331 | ("\\($(5!7!h!6!h!M(B\\)" "$(5$8(B" sanskrit) |
| 325 | ("\\($(5!?!h!6!h!O(B\\)" . "$(5$N(B") | 332 | ("\\($(5!7!h!3(B\\)" "$(5$9(B") |
| 326 | ("\\($(5!?!h!O!h!M(B\\)" . "$(5$O(B") | 333 | ("\\($(5!7!h!4(B\\)" "$(5$:(B") |
| 327 | ("\\($(5!?!h!5(B\\)" . "$(5$P(B") | 334 | ("\\($(5!7!h!5!h!O(B\\)" "$(5$;"q(B") ; Special Rule. May be precomposed font needed. |
| 328 | ("\\($(5!?!h!6(B\\)" . "$(5$Q(B") | 335 | ("\\($(5!7!h!5(B\\)" "$(5$;(B") |
| 329 | ("\\($(5!?!h!?(B\\)" . "$(5$R(B") | 336 | ("\\($(5!7!h!6(B\\)" "$(5$<(B") |
| 330 | ("\\($(5!?!h!L(B\\)" . "$(5$S(B") | 337 | ("\\($(5!7!h!7(B\\)" "$(5$=(B") |
| 331 | ("\\($(5!?!h!M(B\\)" . "$(5$T(B") | 338 | ("\\($(5!7!h!F(B\\)" "$(5$>(B") |
| 332 | ("\\($(5!@!h!M(B\\)" . "$(5$`(B") | 339 | ("\\($(5!7!h!L(B\\)" "$(5$?(B") |
| 333 | ("\\($(5!B!h!B(B\\)" . "$(5$a(B") | 340 | ("\\($(5!7!h!M(B\\)" "$(5$@(B") |
| 334 | ("\\($(5!B!h!F(B\\)" . "$(5$b(B") | 341 | ("\\($(5!8!h(B\\)[$(5!8!<(B]$(5!h(B" "$(5"8(B") ; Half Form |
| 335 | ("\\($(5!D!h!D!h!M(B\\)" . "$(5$c(B") | 342 | ("\\($(5!8!h!8(B\\)" "$(5$A(B") |
| 336 | ("\\($(5!D!h!E!h!M(B\\)" . "$(5$d(B") | 343 | ("\\($(5!8!h!<(B\\)" "$(5$B(B") |
| 337 | ("\\($(5!D!h!K!h!M(B\\)" . "$(5$e(B") | 344 | ("\\($(5!8!h!O!h(B\\)[$(5!3(B-$(5!N!P(B-$(5!X(B]" "$(5"8"q(B") ; Half Form Post "r" |
| 338 | ("\\($(5!D!h!O!h!M(B\\)" . "$(5$f(B") | 345 | ("\\($(5!8!h!O(B\\)" "$(5!8"q(B") ; Post "r" |
| 339 | ("\\($(5!D!h!T!h!M(B\\)" . "$(5$g(B") | 346 | ("\\($(5!8!h(B\\)[$(5!3(B-$(5!N!P(B-$(5!X(B]" "$(5"8(B") ; Half Form |
| 340 | ("\\($(5!D!h!5!h!O(B\\)" . "$(5$h(B") | 347 | ("\\($(5!9!h!M(B\\)" "$(5$C(B") |
| 341 | ("\\($(5!D!h!6!h!O(B\\)" . "$(5$i(B") | 348 | ("\\($(5!:!h!O(B\\)" "$(5$D(B") |
| 342 | ("\\($(5!D!h!D!h!T(B\\)" . "$(5$j(B") | 349 | ("\\($(5!:!h!<!h(B\\)[$(5!3(B-$(5!N!P(B-$(5!X(B]" "$(5"m(B") ; Half Form |
| 343 | ("\\($(5!D!h!E!h!T(B\\)" . "$(5$k(B") | 350 | ("\\($(5!:!h!<(B\\)" "$(5$E(B") |
| 344 | ("\\($(5!D!h!5(B\\)" . "$(5$l(B") | 351 | ("\\($(5!:!h(B\\)[$(5!3(B-$(5!N!P(B-$(5!X(B]" "$(5":(B") ; Half Form |
| 345 | ("\\($(5!D!h!6(B\\)" . "$(5$m(B") | 352 | ("\\($(5!:!i!h!O(B\\)" "$(5"!(B") ; Nukta Post "r" |
| 346 | ("\\($(5!D!h!D(B\\)" . "$(5$n(B") | 353 | ("\\($(5!:!i!h(B\\)[$(5!3(B-$(5!N!P(B-$(5!X(B]" "$(5"z(B") ; Nukta Half Form |
| 347 | ("\\($(5!D!h!E(B\\)" . "$(5$o(B") | 354 | ("\\($(5!:!i(B\\)" "$(5#:(B") ; Nukta |
| 348 | ("\\($(5!D!h!F(B\\)" . "$(5$p(B") | 355 | ("\\($(5!;!h(B\\)[$(5!3(B-$(5!N!P(B-$(5!X(B]" "$(5";(B") ; Half Form |
| 349 | ("\\($(5!D!h!J(B\\)" . "$(5$q(B") | 356 | ("\\($(5!<!h(B\\)$(5!8!h(B[$(5!3(B-$(5!N!P(B-$(5!X(B]" "$(5"<(B") ; Special Half Form |
| 350 | ("\\($(5!D!h!K(B\\)" . "$(5$r(B") | 357 | ("\\($(5!<!h!8(B\\)" "$(5$F(B") |
| 351 | ("\\($(5!D!h!L(B\\)" . "$(5$s(B") | 358 | ("\\($(5!<!h(B\\)$(5!:!h(B[$(5!3(B-$(5!N!P(B-$(5!X(B]" "$(5"<(B") ; Special Half Form |
| 352 | ("\\($(5!D!h!M(B\\)" . "$(5$t(B") | 359 | ("\\($(5!<!h!:(B\\)" "$(5$G(B") |
| 353 | ("\\($(5!D!h!T(B\\)" . "$(5$u(B") | 360 | ("\\($(5!<!h(B\\)[$(5!3(B-$(5!N!P(B-$(5!X(B]" "$(5"<(B") ; Half Form |
| 354 | ("\\($(5!E!h!F(B\\)" . "$(5$v(B") | 361 | ("\\($(5!=!h!3(B\\)" "$(5$H(B") |
| 355 | ("\\($(5!F!h!F(B\\)" . "$(5$w(B") | 362 | ("\\($(5!=!h!=(B\\)" "$(5$I(B") |
| 356 | ("\\($(5!H!h!B(B\\)" . "$(5$x(B") | 363 | ("\\($(5!=!h!>(B\\)" "$(5$J(B") |
| 357 | ("\\($(5!H!h!F(B\\)" . "$(5$y(B") | 364 | ("\\($(5!=!h!M(B\\)" "$(5$K(B") |
| 358 | ("\\($(5!H!h!Q(B\\)" . "$(5$z(B") | 365 | ("\\($(5!>!h!M(B\\)" "$(5$L(B") |
| 359 | ("\\($(5!J!h!F(B\\)" . "$(5${(B") | 366 | ("\\($(5!?!h!5!h!M(B\\)" "$(5$M(B" sanskrit) |
| 360 | ("\\($(5!J!h!J(B\\)" . "$(5$|(B") | 367 | ("\\($(5!?!h!6!h!O(B\\)" "$(5$N(B" sanskrit) |
| 361 | ("\\($(5!J!h!T(B\\)" . "$(5$}(B") | 368 | ("\\($(5!?!h!O!h!M(B\\)" "$(5$O(B") |
| 362 | ("\\($(5!K!h!F(B\\)" . "$(5$~(B") | 369 | ("\\($(5!?!h!5(B\\)" "$(5$P(B") |
| 363 | ("\\($(5!L!h!F(B\\)" . "$(5#P(B") | 370 | ("\\($(5!?!h!6(B\\)" "$(5$Q(B") |
| 364 | ("\\($(5!L!h!Q(B\\)" . "$(5#Q(B") | 371 | ("\\($(5!?!h!?(B\\)" "$(5$R(B") |
| 365 | ("\\($(5!Q!h!Q(B\\)" . "$(5#`(B") | 372 | ("\\($(5!?!h!L(B\\)" "$(5$S(B") |
| 366 | ("\\($(5!T!h!F(B\\)" . "$(5#a(B") | 373 | ("\\($(5!?!h!M(B\\)" "$(5$T(B") |
| 367 | ("\\($(5!T!h!T(B\\)" . "$(5#b(B") | 374 | ("\\($(5!?!i(B\\)" "$(5#?(B") ; Nukta |
| 368 | ("\\($(5!U!h!8(B\\)" . "$(5#c(B") | 375 | ("\\($(5!@!h!M(B\\)" "$(5$`(B") |
| 369 | ("\\($(5!U!h!F(B\\)" . "$(5#d(B") | 376 | ("\\($(5!@!i(B\\)" "$(5#@(B") ; Nukta |
| 370 | ("\\($(5!U!h!J(B\\)" . "$(5#e(B") | 377 | ("\\($(5!A!h(B\\)[$(5!3(B-$(5!N!P(B-$(5!X(B]" "$(5"A(B") ; Half Form |
| 371 | ("\\($(5!U!h!Q(B\\)" . "$(5#f(B") | 378 | ("\\($(5!B!h(B\\)$(5!B!h!O(B" "$(5"B(B") ; Special Rule for "t-tr" |
| 372 | ("\\($(5!U!h!T(B\\)" . "$(5#g(B") | 379 | ("\\($(5!B!h!B!h(B\\)[$(5!3(B-$(5!N!P(B-$(5!X(B]" "$(5"c(B") ; Half Form |
| 373 | ("\\($(5!V!h!=!h!O!h!M(B\\)" . "$(5#h(B") | 380 | ("\\($(5!B!h!B(B\\)" "$(5$a(B") |
| 374 | ("\\($(5!V!h!=!h!M(B\\)" . "$(5#i(B") | 381 | ("\\($(5!B!h!F(B\\)" "$(5$b(B") |
| 375 | ("\\($(5!V!h!=!h!T(B\\)" . "$(5#j(B") | 382 | ("\\($(5!B!h!O!h(B\\)[$(5!3(B-$(5!N!P(B-$(5!X(B]" "$(5"d(B") ; Half Form Post "r" |
| 376 | ("\\($(5!V!h!=(B\\)" . "$(5#k(B") | 383 | ("\\($(5!B!h!O(B\\)" "$(5"%(B") ; Post "r" |
| 377 | ("\\($(5!V!h!>(B\\)" . "$(5#l(B") | 384 | ("\\($(5!B!h(B\\)[$(5!3(B-$(5!N!P(B-$(5!X(B]" "$(5"B(B") ; Half Form |
| 378 | ("\\($(5!W!h!F(B\\)" . "$(5#m(B") | 385 | ("\\($(5!C!h!O(B\\)" "$(5!C"q(B") ; Post "r" |
| 379 | ("\\($(5!W!h!O(B\\)" . "$(5#n(B") | 386 | ("\\($(5!C!h(B\\)[$(5!3(B-$(5!N!P(B-$(5!X(B]" "$(5"C(B") ; Half Form |
| 380 | ("\\($(5!X!h!A(B\\)" . "$(5#p(B") | 387 | ("\\($(5!D!h!D!h!M(B\\)" "$(5$c(B") |
| 381 | ("\\($(5!X!h!F(B\\)" . "$(5#q(B") | 388 | ("\\($(5!D!h!E!h!M(B\\)" "$(5$d(B") |
| 382 | ("\\($(5!X!h!L(B\\)" . "$(5#r(B") | 389 | ("\\($(5!D!h!K!h!M(B\\)" "$(5$e(B") |
| 383 | ("\\($(5!X!h!M(B\\)" . "$(5#s(B") | 390 | ("\\($(5!D!h!K!h!O(B\\)" "$(5$r"r(B") ; Special Case for "dbhr" ; *** |
| 384 | ("\\($(5!X!h!O(B\\)" . "$(5#t(B") | 391 | ("\\($(5!D!h!O!h!M(B\\)" "$(5$f(B") |
| 385 | ("\\($(5!X!h!Q(B\\)" . "$(5#u(B") | 392 | ("\\($(5!D!h!T!h!M(B\\)" "$(5$g(B") |
| 386 | ("\\($(5!X!h!T(B\\)" . "$(5#v(B") | 393 | ("\\($(5!D!h!5!h!O(B\\)" "$(5$h(B") |
| 387 | ;; Special Ligature Rules | 394 | ("\\($(5!D!h!6!h!O(B\\)" "$(5$i(B") |
| 388 | ("\\($(5!X!_(B\\)" . "$(5#R(B") | 395 | ("\\($(5!D!h!D!h!T(B\\)" "$(5$j(B") |
| 389 | 396 | ("\\($(5!D!h!E!h!T(B\\)" "$(5$k(B") | |
| 390 | ;; Half form with ligature. Special "r" case is included. "r" | 397 | ("\\($(5!D!h(B\\)$(5!E!h(B[$(5!3(B-$(5!N!P(B-$(5!X(B]" "$(5!D!h(B") ; Special Half Form (for ddhra) |
| 391 | ;; connection which is not listed here has not been examined yet. | 398 | ("\\($(5!D!h!5(B\\)" "$(5$l(B") |
| 392 | ;; I don't know what to do with them. | 399 | ("\\($(5!D!h!6(B\\)" "$(5$m(B") |
| 400 | ("\\($(5!D!h!D(B\\)" "$(5$n(B") | ||
| 401 | ("\\($(5!D!h!E(B\\)" "$(5$o(B") | ||
| 402 | ("\\($(5!D!h!F(B\\)" "$(5$p(B") | ||
| 403 | ("\\($(5!D!h(B\\)$(5!J!h(B" "$(5!D!h(B") ; Suppressing "db-" | ||
| 404 | ("\\($(5!D!h!J(B\\)" "$(5$q(B") | ||
| 405 | ("\\($(5!D!h!K(B\\)" "$(5$r(B") | ||
| 406 | ("\\($(5!D!h!L(B\\)" "$(5$s(B") | ||
| 407 | ("\\($(5!D!h!M(B\\)" "$(5$t(B") | ||
| 408 | ("\\($(5!D!h!T(B\\)" "$(5$u(B") | ||
| 409 | ("\\($(5!E!h!F!h(B\\)[$(5!3(B-$(5!N!P(B-$(5!X(B]" "$(5"e(B") ; Half Form | ||
| 410 | ("\\($(5!E!h!F(B\\)" "$(5$v(B") | ||
| 411 | ("\\($(5!E!h!O!h(B\\)[$(5!3(B-$(5!N!P(B-$(5!X(B]" "$(5"f(B") ; Half Form Post "r" | ||
| 412 | ("\\($(5!E!h!O(B\\)" "$(5!E"q(B") ; Post "r" | ||
| 413 | ("\\($(5!E!h(B\\)[$(5!3(B-$(5!N!P(B-$(5!X(B]" "$(5"E(B") ; Half Form | ||
| 414 | ("\\($(5!F!h!F!h(B\\)[$(5!3(B-$(5!N!P(B-$(5!X(B]" "$(5"k(B") ; Half Form | ||
| 415 | ("\\($(5!F!h!F(B\\)" "$(5$w(B") | ||
| 416 | ("\\($(5!F!h!O(B\\)" "$(5!F"q(B") | ||
| 417 | ("\\($(5!F!h(B\\)[$(5!3(B-$(5!N!P(B-$(5!X(B]" "$(5"F(B") ; Half Form | ||
| 418 | ("\\($(5!G!h(B\\)[$(5!3(B-$(5!N!P(B-$(5!X(B]" "$(5"G(B") ; Nukta Half Form | ||
| 419 | ("\\($(5!H!h(B\\)$(5!B!h!O(B" "$(5"H(B") ; Special Rule for "p-tr" | ||
| 420 | ("\\($(5!H!h!B!h(B\\)[$(5!3(B-$(5!N!P(B-$(5!X(B]" "$(5"g(B") ; Half Form | ||
| 421 | ("\\($(5!H!h!B(B\\)" "$(5$x(B") | ||
| 422 | ("\\($(5!H!h!F(B\\)" "$(5$y(B") | ||
| 423 | ("\\($(5!H!h!Q(B\\)" "$(5$z(B") | ||
| 424 | ("\\($(5!H!h!O(B\\)" "$(5"&(B") ; Post "r" | ||
| 425 | ("\\($(5!H!h(B\\)[$(5!3(B-$(5!N!P(B-$(5!X(B]" "$(5"H(B") ; Half Form | ||
| 426 | ("\\($(5!I!h!O(B\\)" "$(5"'(B") ; Post "r" | ||
| 427 | ("\\($(5!I!h(B\\)[$(5!3(B-$(5!N!P(B-$(5!X(B]" "$(5"I(B") ; Half Form | ||
| 428 | ("\\($(5!I!i!h!O(B\\)" "$(5""(B") ; Nukta Post "r" | ||
| 429 | ("\\($(5!I!i!h(B\\)[$(5!3(B-$(5!N!P(B-$(5!X(B]" "$(5"y(B") ; Nukta Half Form | ||
| 430 | ("\\($(5!I!i(B\\)" "$(5#I(B") ; Nukta | ||
| 431 | ("\\($(5!J!h(B\\)$(5!F!h(B[$(5!3(B-$(5!N!P(B-$(5!X(B]" "$(5"J(B") ; Special Half Form | ||
| 432 | ("\\($(5!J!h!F(B\\)" "$(5${(B") | ||
| 433 | ("\\($(5!J!h(B\\)$(5!J!h(B[$(5!3(B-$(5!N!P(B-$(5!X(B]" "$(5"J(B") ; Special Half Form | ||
| 434 | ("\\($(5!J!h!J(B\\)" "$(5$|(B") | ||
| 435 | ("\\($(5!J!h(B\\)$(5!T!h(B[$(5!3(B-$(5!N!P(B-$(5!X(B]" "$(5"J(B") ; Special Half Form | ||
| 436 | ("\\($(5!J!h!T(B\\)" "$(5$}(B") | ||
| 437 | ("\\($(5!J!h!O(B\\)" "$(5!J"q(B") ; Post "r" | ||
| 438 | ("\\($(5!J!h(B\\)[$(5!3(B-$(5!N!P(B-$(5!X(B]" "$(5"J(B") ; Half Form | ||
| 439 | ("\\($(5!K!h!F(B\\)" "$(5$~(B") | ||
| 440 | ("\\($(5!K!h!O(B\\)" "$(5!K"q(B") ; Post "r" | ||
| 441 | ("\\($(5!K!h(B\\)[$(5!3(B-$(5!N!P(B-$(5!X(B]" "$(5"K(B") ; Half Form | ||
| 442 | ("\\($(5!L!h!F(B\\)" "$(5#P(B") | ||
| 443 | ("\\($(5!L!h!Q(B\\)" "$(5#Q(B") | ||
| 444 | ("\\($(5!L!h!O(B\\)" "$(5!L"q(B") ; Post "r" | ||
| 445 | ("\\($(5!L!h(B\\)[$(5!3(B-$(5!N!P(B-$(5!X(B]" "$(5"L(B") ; Half Form | ||
| 446 | ("\\($(5!M!h(B\\)[$(5!3(B-$(5!N!P(B-$(5!X(B]" "$(5"M(B") ; Half Form | ||
| 447 | ("\\($(5!N!h(B\\)[$(5!3(B-$(5!N!P(B-$(5!X(B]" "$(5"N(B") ; Half Form | ||
| 448 | ;; special form for "ru". | ||
| 449 | ("\\($(5!O!](B\\)" "$(5",(B") | ||
| 450 | ("\\($(5!O!^(B\\)" "$(5"-(B") | ||
| 451 | ("\\($(5!P!](B\\)" "$(5".(B") | ||
| 452 | ("\\($(5!P!^(B\\)" "$(5"/(B") | ||
| 393 | ;; | 453 | ;; |
| 394 | ;; ordinary forms | 454 | ("\\($(5!Q!h!Q(B\\)" "$(5#`(B" sanskrit) |
| 395 | ("\\($(5!5!h!O!h(B\\)[$(5!3(B-$(5!X(B]" . "$(5"`(B") | 455 | ("\\($(5!Q!h(B\\)[$(5!3(B-$(5!N!P(B-$(5!X(B]" "$(5"Q(B") ; Half Form |
| 396 | ("\\($(5!6!h!F!h(B\\)[$(5!3(B-$(5!X(B]" . "$(5"a(B") | 456 | ("\\($(5!R!h(B\\)[$(5!3(B-$(5!N!P(B-$(5!X(B]" "$(5"R(B") ; Half Form |
| 397 | ;; ("\\($(5!<!h!8!h(B\\)[$(5!3(B-$(5!X(B]" . "$(5"c(B") ; Mistake, must check later. | 457 | ("\\($(5!S!h(B\\)[$(5!3(B-$(5!N!P(B-$(5!X(B]" "$(5"S(B") ; Half Form |
| 398 | ("\\($(5!B!h!O!h(B\\)[$(5!3(B-$(5!X(B]" . "$(5"d(B") | 458 | ("\\($(5!T!h!F(B\\)" "$(5#a(B") |
| 399 | ("\\($(5!E!h!F!h(B\\)[$(5!3(B-$(5!X(B]" . "$(5"e(B") | 459 | ("\\($(5!T!h!T(B\\)" "$(5#b(B") |
| 400 | ("\\($(5!E!h!O!h(B\\)[$(5!3(B-$(5!X(B]" . "$(5"f(B") | 460 | ("\\($(5!T!h!O(B\\)" "$(5!T"q(B") ; Post "r" |
| 401 | ("\\($(5!H!h!B!h(B\\)[$(5!3(B-$(5!X(B]" . "$(5"g(B") | 461 | ("\\($(5!T!h(B\\)[$(5!3(B-$(5!N!P(B-$(5!X(B]" "$(5"T(B") ; Half Form |
| 402 | ("\\($(5!U!h!8!h(B\\)[$(5!3(B-$(5!X(B]" . "$(5"h(B") | 462 | ("\\($(5!U!h!8!h(B\\)[$(5!3(B-$(5!N!P(B-$(5!X(B]" "$(5"h(B") ; Half Form |
| 403 | ("\\($(5!U!h!O!h(B\\)[$(5!3(B-$(5!X(B]" . "$(5"i(B") | 463 | ("\\($(5!U!h!8(B\\)" "$(5#c(B") |
| 404 | ("\\($(5!U!h!T!h(B\\)[$(5!3(B-$(5!X(B]" . "$(5"j(B") | 464 | ("\\($(5!U!h!F(B\\)" "$(5#d(B") |
| 405 | ;; ("\\($(5!U!h!T!h(B\\)[$(5!3(B-$(5!X(B]" . "$(5"k(B") ; must check later. | 465 | ("\\($(5!U!h!J(B\\)" "$(5#e(B") |
| 406 | ;; Conjunction form associated with Nukta sign. | 466 | ("\\($(5!U!h!Q(B\\)" "$(5#f(B") |
| 407 | ("\\($(5!3!i!h(B\\)[$(5!3(B-$(5!X(B]" . "$(5"s(B") | 467 | ("\\($(5!U!h(B\\)$(5!T!h!O(B" "$(5"U(B") ; Special Half Form |
| 408 | ("\\($(5!4!i!h(B\\)[$(5!3(B-$(5!X(B]" . "$(5"t(B") | 468 | ("\\($(5!U!h!T!h(B\\)[$(5!3(B-$(5!N!P(B-$(5!X(B]" "$(5"j(B") ; Half Form |
| 409 | ("\\($(5!5!i!h(B\\)[$(5!3(B-$(5!X(B]" . "$(5"u(B") | 469 | ; ("\\($(5!U!h!T(B\\)" "$(5#g(B") |
| 410 | ("\\($(5!:!i!h(B\\)[$(5!3(B-$(5!X(B]" . "$(5"z(B") | 470 | ("\\($(5!U!h!O!h!T(B\\)" "$(5#g(B") |
| 411 | ("\\($(5!I!i!h(B\\)[$(5!3(B-$(5!X(B]" . "$(5"y(B") | 471 | ("\\($(5!U!h!O!h(B\\)[$(5!3(B-$(5!N!P(B-$(5!X(B]" "$(5"i(B") ; Half Form |
| 472 | ("\\($(5!U!h!O(B\\)" "$(5")(B") ; Post "r" | ||
| 473 | ("\\($(5!U!h(B\\)[$(5!3(B-$(5!N!P(B-$(5!X(B]" "$(5"U(B") ; Half Form | ||
| 474 | ("\\($(5!V!h!=!h!O!h!M(B\\)" "$(5#h(B") | ||
| 475 | ("\\($(5!V!h!=!h!M(B\\)" "$(5#i(B") | ||
| 476 | ("\\($(5!V!h!=!h!T(B\\)" "$(5#j(B") | ||
| 477 | ("\\($(5!V!h!=(B\\)" "$(5#k(B") | ||
| 478 | ("\\($(5!V!h!>(B\\)" "$(5#l(B") | ||
| 479 | ("\\($(5!V!h!O(B\\)" "$(5!V"q(B") ; Post "r" | ||
| 480 | ("\\($(5!V!h(B\\)[$(5!3(B-$(5!N!P(B-$(5!X(B]" "$(5"V(B") ; Half Form | ||
| 481 | ("\\($(5!W!h!F!h(B\\)[$(5!3(B-$(5!N!P(B-$(5!X(B]" "$(5"W"F(B") ; Special Half Form | ||
| 482 | ("\\($(5!W!h!F(B\\)" "$(5#m(B") | ||
| 483 | ("\\($(5!W!h!O(B\\)" "$(5#n(B") | ||
| 484 | ("\\($(5!W!h(B\\)[$(5!3(B-$(5!N!P(B-$(5!X(B]" "$(5"W(B") ; Half Form | ||
| 485 | ("\\($(5!X!h!A(B\\)" "$(5#p(B") | ||
| 486 | ("\\($(5!X!h!F(B\\)" "$(5#q(B") | ||
| 487 | ("\\($(5!X!h!L(B\\)" "$(5#r(B") | ||
| 488 | ("\\($(5!X!h!M(B\\)" "$(5#s(B") | ||
| 489 | ("\\($(5!X!h!O(B\\)" "$(5#t(B") | ||
| 490 | ("\\($(5!X!h!Q(B\\)" "$(5#u(B") | ||
| 491 | ("\\($(5!X!h!T(B\\)" "$(5#v(B") | ||
| 492 | ;; Special Ligature Rules | ||
| 493 | ("\\($(5!X!_(B\\)" "$(5#R(B") | ||
| 412 | 494 | ||
| 413 | ;; For consonants other than listed above, glyph-composition will | 495 | ;; For consonants other than listed above, glyph-composition will |
| 414 | ;; be applied. If the consonant which is preceding "$(5!O(B" does not | 496 | ;; be applied. If the consonant which is preceding "$(5!O(B" does not |
| 415 | ;; have the vertical line (such as "$(5!?(B"), "$(5"r(B" is put beneath the | 497 | ;; have the vertical line (such as "$(5!?(B"), "$(5"r(B" is put beneath the |
| 416 | ;; consonant. | 498 | ;; consonant. |
| 417 | ;; | 499 | ;; |
| 418 | ("[$(5!7!9!=!>!?!@!D!O!P!R!S!X(B]\\($(5!h!O(B\\)" . "$(5"r(B") | 500 | ("[$(5!7!9!=!>!?!@!D!O!P!R!S!X(B]\\($(5!h!O(B\\)" "$(5"r(B") |
| 419 | ("\\($(5!J!h!O(B\\)" . "$(5!J"r(B") ; Protect from Half form conversion. | 501 | ("[$(5!6!8!C!E!F!H!J!K!L!M!T!V(B]\\($(5!h!O(B\\)" "$(5"q(B") |
| 420 | ("\\($(5!E!h!O(B\\)" . "$(5!E"r(B") ; Will be replaced with precomposed font. | 502 | ("$(5!?!i(B\\($(5!h!O(B\\)" "$(5"r(B") |
| 421 | ("\\($(5!6!h!O(B\\)" . "$(5!6"r(B") | 503 | ("$(5!@!i(B\\($(5!h!O(B\\)" "$(5"r(B") |
| 422 | ("\\($(5!K!h!O(B\\)" . "$(5!K"r(B") | 504 | |
| 423 | ("\\($(5!T!h!O(B\\)" . "$(5!T"r(B") | 505 | ;; Nukta with Non-Consonants |
| 424 | ("\\($(5!L!h!O(B\\)" . "$(5!L"r(B") | 506 | ("\\($(5!!!i(B\\)" "$(5#!(B") |
| 425 | ("\\($(5!7!h!5!h!O(B\\)" . "$(5$;"r(B") ; Ggr | 507 | ("\\($(5!&!i(B\\)" "$(5#&(B") |
| 426 | ("\\($(5!7!h!3!h!O(B\\)" . "$(5$9"r(B") ; Gkr | 508 | ("\\($(5!'!i(B\\)" "$(5#'(B") |
| 427 | 509 | ("\\($(5!*!i(B\\)" "$(5#*(B") | |
| 428 | ("$(5!?!i(B\\($(5!h!O(B\\)" . "$(5"r(B") | 510 | ("\\($(5![!i(B\\)" "$(5#L(B") |
| 429 | ("$(5!@!i(B\\($(5!h!O(B\\)" . "$(5"r(B") | 511 | ("\\($(5!\!i(B\\)" "$(5#M(B") |
| 430 | 512 | ("\\($(5!_!i(B\\)" "$(5#K(B") | |
| 431 | ;; Nukta | 513 | ("\\($(5!j!i(B\\)" "$(5#J(B") |
| 432 | ("\\($(5!!!i(B\\)" . "$(5#!(B") | 514 | |
| 433 | ("\\($(5!&!i(B\\)" . "$(5#&(B") | 515 | ;; Special rule for "r + some vowels" |
| 434 | ("\\($(5!'!i(B\\)" . "$(5#'(B") | 516 | ("\\($(5!O!_(B\\)" "$(5!*"p(B") |
| 435 | ("\\($(5!*!i(B\\)" . "$(5#*(B") | 517 | ("\\($(5!O#L(B\\)" "$(5#&"p(B") |
| 436 | ("\\($(5![!i(B\\)" . "$(5#L(B") | 518 | ("\\($(5!O#K(B\\)" "$(5#*"p(B") |
| 437 | ("\\($(5!\!i(B\\)" . "$(5#M(B") | 519 | ("\\($(5!O#M(B\\)" "$(5#'"p(B") |
| 438 | ("\\($(5!_!i(B\\)" . "$(5#K(B") | ||
| 439 | ("\\($(5!3!i(B\\)" . "$(5#3(B") | ||
| 440 | ("\\($(5!4!i(B\\)" . "$(5#4(B") | ||
| 441 | ("\\($(5!5!i(B\\)" . "$(5#5(B") | ||
| 442 | ("\\($(5!:!i(B\\)" . "$(5#:(B") | ||
| 443 | ("\\($(5!?!i(B\\)" . "$(5#?(B") | ||
| 444 | ("\\($(5!@!i(B\\)" . "$(5#@(B") | ||
| 445 | ("\\($(5!I!i(B\\)" . "$(5#I(B") | ||
| 446 | ("\\($(5!j!i(B\\)" . "$(5#J(B") | ||
| 447 | |||
| 448 | ;; Half forms. | ||
| 449 | ("\\($(5!3!h(B\\)[$(5!3(B-$(5!X(B]" . "$(5"3(B") | ||
| 450 | ("\\($(5!4!h(B\\)[$(5!3(B-$(5!X(B]" . "$(5"4(B") | ||
| 451 | ("\\($(5!5!h(B\\)[$(5!3(B-$(5!X(B]" . "$(5"5(B") | ||
| 452 | ("\\($(5!6!h(B\\)[$(5!3(B-$(5!X(B]" . "$(5"6(B") | ||
| 453 | ("\\($(5!8!h(B\\)[$(5!3(B-$(5!X(B]" . "$(5"8(B") | ||
| 454 | ("\\($(5!:!h(B\\)[$(5!3(B-$(5!X(B]" . "$(5":(B") | ||
| 455 | ("\\($(5!;!h(B\\)[$(5!3(B-$(5!X(B]" . "$(5";(B") | ||
| 456 | ("\\($(5!<!h(B\\)[$(5!3(B-$(5!X(B]" . "$(5"<(B") | ||
| 457 | ("\\($(5!A!h(B\\)[$(5!3(B-$(5!X(B]" . "$(5"A(B") | ||
| 458 | ("\\($(5!B!h(B\\)[$(5!3(B-$(5!X(B]" . "$(5"B(B") | ||
| 459 | ("\\($(5!C!h(B\\)[$(5!3(B-$(5!X(B]" . "$(5"C(B") | ||
| 460 | ("\\($(5!E!h(B\\)[$(5!3(B-$(5!X(B]" . "$(5"E(B") | ||
| 461 | ("\\($(5!F!h(B\\)[$(5!3(B-$(5!X(B]" . "$(5"F(B") | ||
| 462 | ("\\($(5!G!h(B\\)[$(5!3(B-$(5!X(B]" . "$(5"G(B") | ||
| 463 | ("\\($(5!H!h(B\\)[$(5!3(B-$(5!X(B]" . "$(5"H(B") | ||
| 464 | ("\\($(5!I!h(B\\)[$(5!3(B-$(5!X(B]" . "$(5"I(B") | ||
| 465 | ("\\($(5!J!h(B\\)[$(5!3(B-$(5!X(B]" . "$(5"J(B") | ||
| 466 | ("\\($(5!K!h(B\\)[$(5!3(B-$(5!X(B]" . "$(5"K(B") | ||
| 467 | ("\\($(5!L!h(B\\)[$(5!3(B-$(5!X(B]" . "$(5"L(B") | ||
| 468 | ("\\($(5!M!h(B\\)[$(5!3(B-$(5!X(B]" . "$(5"M(B") | ||
| 469 | ("\\($(5!N!h(B\\)[$(5!3(B-$(5!X(B]" . "$(5"N(B") | ||
| 470 | ("\\($(5!Q!h(B\\)[$(5!3(B-$(5!X(B]" . "$(5"Q(B") | ||
| 471 | ("\\($(5!R!h(B\\)[$(5!3(B-$(5!X(B]" . "$(5"R(B") | ||
| 472 | ("\\($(5!S!h(B\\)[$(5!3(B-$(5!X(B]" . "$(5"S(B") | ||
| 473 | ("\\($(5!T!h(B\\)[$(5!3(B-$(5!X(B]" . "$(5"T(B") | ||
| 474 | ("\\($(5!U!h(B\\)[$(5!3(B-$(5!X(B]" . "$(5"U(B") | ||
| 475 | ("\\($(5!V!h(B\\)[$(5!3(B-$(5!X(B]" . "$(5"V(B") | ||
| 476 | ("\\($(5!W!h(B\\)[$(5!3(B-$(5!X(B]" . "$(5"W(B") | ||
| 477 | |||
| 478 | ;; Special rule for "rR" | ||
| 479 | ("\\($(5!O!_(B\\)" . "$(5!*"p(B") | ||
| 480 | ;; If everything fails, "y" will connect to the front consonant. | 520 | ;; If everything fails, "y" will connect to the front consonant. |
| 481 | ("\\($(5!h!M(B\\)" . "$(5"](B") | 521 | ("\\($(5!h!M(B\\)" "$(5"](B") |
| 482 | ) | 522 | ) |
| 483 | "Alist of regexps of Devanagari character sequences vs composed characters.") | 523 | "Alist of regexps of Devanagari character sequences vs composed characters.") |
| 484 | 524 | ||
| 485 | ;; Example: | ||
| 486 | ;;("\\($(5!F!h(B\\)[$(5!3(B-$(5!X(B]" . "$(5"F(B") | ||
| 487 | ;;(string-match "\\($(5!F!h(B\\)[$(5!3(B-$(5!X(B]" "$(5!X![!F!h!D!\(B") => 8 | ||
| 488 | ;;(match-end 1) => 16 | ||
| 489 | |||
| 490 | ;; | ||
| 491 | ;; Defining character properties : char-to-glyph, glyph-to-char | ||
| 492 | ;; | ||
| 493 | ;; * If char-to-glyph is non-nil, it would be one of the following forms. | ||
| 494 | ;; | ||
| 495 | ;; (("character-regexp" . "glyphs") | ||
| 496 | ;; .....) or | ||
| 497 | ;; (("character-regexp" . ?glyph) | ||
| 498 | ;; .....) or | ||
| 499 | ;; ("characters-regexp" . "glyphs") | ||
| 500 | ;; or | ||
| 501 | ;; ?glyph | ||
| 502 | ;; | ||
| 503 | ;; * If glyph-to-char is non-nil, it would be one of the following forms. | ||
| 504 | ;; | ||
| 505 | ;; (("glyph-regexp" . "characters") ;; This is the only case in Devanagari | ||
| 506 | ;; ....) or | ||
| 507 | ;; (("glyph-regexp" . ?character) | ||
| 508 | ;; ....) or | ||
| 509 | ;; ("glyph-regexp" . "characters") | ||
| 510 | ;; or | ||
| 511 | ;; "characters" | ||
| 512 | ;; or | ||
| 513 | ;; ?character | ||
| 514 | ;; | ||
| 515 | |||
| 516 | (let ((rules devanagari-char-to-glyph-rules)) | 525 | (let ((rules devanagari-char-to-glyph-rules)) |
| 517 | (while rules | 526 | (while rules |
| 518 | (let ((rule (car rules)) | 527 | (let ((rule (car rules)) |
| 519 | (chars) (char) (glyph)) | 528 | (chars) (char) (glyphs) (glyph)) |
| 520 | (setq rules (cdr rules)) | 529 | (setq rules (cdr rules)) |
| 521 | (string-match "\\\\(\\(.+\\)\\\\)" (car rule)) | 530 | (string-match "\\\\(\\(.+\\)\\\\)" (car rule)) |
| 522 | (setq chars (substring (car rule) (match-beginning 1) (match-end 1))) | 531 | (setq chars (substring (car rule) (match-beginning 1) (match-end 1))) |
| 523 | (setq char (string-to-char chars)) | 532 | (setq char (string-to-char chars)) |
| 524 | (setq glyph (string-to-char (cdr rule))) ; assume one glyph in devan. | 533 | (setq glyphs (cdr rule)) |
| 534 | (setq glyph (string-to-char (car glyphs))) | ||
| 525 | (put-char-code-property | 535 | (put-char-code-property |
| 526 | char 'char-to-glyph | 536 | char 'char-to-glyph |
| 527 | (append (get-char-code-property char 'char-to-glyph) (list rule))) | 537 | ;; We don't "cons" it since priority is top to down. |
| 528 | (put-char-code-property glyph 'glyph-to-char chars)))) | 538 | (append (get-char-code-property char 'char-to-glyph) (list rule))) |
| 539 | |||
| 540 | (if (and (< ?(5z(B glyph) ; Glyphs only. | ||
| 541 | (null (get-char-code-property glyph 'glyph-to-char))) | ||
| 542 | ; One glyph may corresponds to multiple characters, | ||
| 543 | ; e.g., surrounding vowel in Tamil, etc. | ||
| 544 | ; but for Devanagari, we put this restriction | ||
| 545 | ; to make sure the fact that one glyph corresponds to one char. | ||
| 546 | (put-char-code-property | ||
| 547 | glyph 'glyph-to-char | ||
| 548 | (cons (list (car glyphs) chars) | ||
| 549 | (get-char-code-property glyph 'glyph-to-char) | ||
| 550 | )))))) | ||
| 529 | 551 | ||
| 530 | ;; | 552 | ;; |
| 531 | ;; Convert Character Code to Glyph Code | 553 | ;; Function used in both characters-to-glyphs conversion and |
| 554 | ;; glyphs-to-characters conversion. | ||
| 532 | ;; | 555 | ;; |
| 533 | 556 | ||
| 534 | ;;;###autoload | 557 | (defun max-match-len (regexp-str) |
| 535 | (defun char-to-glyph-devanagari (src-str) | 558 | "This returns the possible length of matched string of given regexp. |
| 536 | "Convert Devanagari characters in the string to Devanagari glyphs. | 559 | Only [...] pattern of regexp is recognized. The last character of |
| 537 | Ligatures and special rules are processed." | 560 | inside of [....] is used for its length." |
| 561 | (let ((dest-str regexp-str)) | ||
| 562 | (while (string-match "\\[\\([^\]]\\)+\\]" dest-str) | ||
| 563 | (setq dest-str | ||
| 564 | (concat (substring dest-str 0 (match-beginning 0)) | ||
| 565 | (substring dest-str (match-beginning 1) (match-end 1)) | ||
| 566 | (substring dest-str (match-end 0))))) | ||
| 567 | (length dest-str))) | ||
| 568 | |||
| 569 | (defun string-conversion-by-rule (src-str symbol &rest specs) | ||
| 570 | " This function converts the SRC-STR to the new string according to | ||
| 571 | the rules described in the each character's SYMBOL property. The | ||
| 572 | rules are described in the forms of '((regexp str <specs>) ...), and | ||
| 573 | the character sequence in the string which matches to 'regexp' are | ||
| 574 | replaced with str. If SPECS are not specified, only rules with no | ||
| 575 | <specs> would be applied. If SPECS are specified, then rules with no | ||
| 576 | <specs> specified and rules with <spec> matches with SPECS would be | ||
| 577 | applied. Rules are tested in the order of the list, thus more | ||
| 578 | specific rules should be placed in front of less important rules. No | ||
| 579 | composite character is supported, thus such must be converted by | ||
| 580 | decompose-char before applying to this function. If rule is given in | ||
| 581 | the forms of regexp '...\\(...\\)...', then inside the parenthesis is | ||
| 582 | the subject of the match. Otherwise, the entire expression is the | ||
| 583 | subject of the match." | ||
| 538 | (let ((pos 0) | 584 | (let ((pos 0) |
| 539 | (dst-str "")) | 585 | (dst-str "")) |
| 540 | (while (< pos (length src-str)) | 586 | (while (< pos (length src-str)) |
| 541 | (let ((found nil) | 587 | (let ((found nil) |
| 542 | (rules (get-char-code-property | 588 | (rules (get-char-code-property |
| 543 | (string-to-char | 589 | (string-to-char |
| 544 | ;; caution. other forms not supported for now. | 590 | (substring src-str pos)) symbol))) |
| 545 | (substring src-str pos)) 'char-to-glyph))) | ||
| 546 | (while rules | 591 | (while rules |
| 547 | (let* ((rule (car rules)) | 592 | (let* ((rule (car rules)) |
| 548 | (regexp (car rule))) | 593 | (regexp (car rule)) |
| 549 | (if (string-match regexp src-str) | 594 | (replace-str (car (cdr rule))) |
| 550 | (if (= (match-beginning 1) pos) | 595 | (rule-specs (cdr (cdr rule))) |
| 551 | (progn | 596 | search-pos) |
| 552 | (setq dst-str (concat dst-str (cdr rule))) | 597 | (if (not (or (null rule-specs) |
| 553 | (setq rules nil) ; Get out of the loop. | 598 | (intersection specs rule-specs))) |
| 554 | (setq found t) | 599 | (setq rules (cdr rules)) |
| 555 | ;; proceed `pos' for replaced characters. | 600 | (if (null (string-match "\\\\(.+\\\\)" regexp)) |
| 556 | (setq pos (match-end 1))) | 601 | (progn |
| 557 | (setq rules (cdr rules))) | 602 | (setq regexp (concat "\\(" regexp "\\)")) |
| 558 | (setq rules (cdr rules))))) | 603 | (setq search-pos pos)) |
| 604 | (setq search-pos (- pos (max-match-len | ||
| 605 | (substring regexp | ||
| 606 | (string-match "^[^\\\\]*" regexp) | ||
| 607 | (match-end 0)))))) | ||
| 608 | (if (< search-pos 0) (setq search-pos 0)) | ||
| 609 | (if (string-match regexp src-str search-pos) | ||
| 610 | (if (= (match-beginning 1) pos) | ||
| 611 | (progn | ||
| 612 | (setq dst-str (concat dst-str replace-str)) | ||
| 613 | (setq rules nil) ; Get out of the loop. | ||
| 614 | (setq found t) | ||
| 615 | ;; proceed `pos' for replaced characters. | ||
| 616 | (setq pos (match-end 1))) | ||
| 617 | (setq rules (cdr rules))) | ||
| 618 | (setq rules (cdr rules)))))) | ||
| 559 | ;; proceed to next position | 619 | ;; proceed to next position |
| 560 | (if (not found) | 620 | (if (not found) |
| 561 | (let ((nextchar (string-to-char (substring src-str pos)))) | 621 | (let ((nextchar (string-to-char (substring src-str pos)))) |
| @@ -564,6 +624,19 @@ Ligatures and special rules are processed." | |||
| 564 | (setq dst-str (concat dst-str (char-to-string nextchar))))))) | 624 | (setq dst-str (concat dst-str (char-to-string nextchar))))))) |
| 565 | dst-str)) | 625 | dst-str)) |
| 566 | 626 | ||
| 627 | |||
| 628 | ;; | ||
| 629 | ;; Convert Character Code to Glyph Code | ||
| 630 | ;; | ||
| 631 | |||
| 632 | ;;;###autoload | ||
| 633 | (defun char-to-glyph-devanagari (src-str &rest langs) | ||
| 634 | "Convert Devanagari characters in the string to Devanagari glyphs. | ||
| 635 | Ligatures and special rules are processed." | ||
| 636 | (apply | ||
| 637 | 'string-conversion-by-rule | ||
| 638 | (append (list src-str 'char-to-glyph) langs))) | ||
| 639 | |||
| 567 | ;; Example: | 640 | ;; Example: |
| 568 | ;;(char-to-glyph-devanagari "$(5!X) | 715 | (?$(5!](B 0 (br . tr)) |
| 648 | (?$(5!^(B 40 (bc . tc)) | 716 | (?$(5!^(B 0 (br . tr)) |
| 649 | (?$(5!_(B 40 (bc . tc)) | 717 | (?$(5!_(B 0 (br . tr)) |
| 650 | (?$(5!`(B 40 (mr . mr)) ; (tc . bc) | 718 | (?$(5!`(B 0 (mr . mr)) ; (tc . bc) |
| 651 | (?$(5!a(B 40 (mr . mr)) | 719 | (?$(5!a(B 0 (mr . mr)) |
| 652 | (?$(5!b(B 40 (mr . mr)) | 720 | (?$(5!b(B 0 (mr . mr)) |
| 653 | (?$(5!c(B 40 (mr . mr)) | 721 | (?$(5!c(B 0 (mr . mr)) |
| 654 | (?$(5!d(B 40) | 722 | (?$(5!d(B 0) |
| 655 | (?$(5!e(B 40) | 723 | (?$(5!e(B 0) |
| 656 | (?$(5!f(B 40) | 724 | (?$(5!f(B 0) |
| 657 | (?$(5!g(B 40) | 725 | (?$(5!g(B 0) |
| 658 | (?$(5!h(B 0 (br . tr)) | 726 | (?$(5!h(B 0 (br . tr)) |
| 659 | (?$(5!i(B 0 (br . tr)) | 727 | (?$(5!i(B 0 (br . tr)) |
| 660 | (?$(5!j(B 0) | 728 | (?$(5!j(B 0) |
| @@ -757,9 +825,9 @@ Ligatures and special rules are processed." | |||
| 757 | (?$(5"m(B 0) | 825 | (?$(5"m(B 0) |
| 758 | (?$(5"n(B 0) | 826 | (?$(5"n(B 0) |
| 759 | (?$(5"o(B 0) | 827 | (?$(5"o(B 0) |
| 760 | (?$(5"p(B 30 (mr . mr)) | 828 | (?$(5"p(B 10 (mr . mr)) |
| 761 | (?$(5"q(B 30 (br . tr)) | 829 | (?$(5"q(B 0 (br . br)) |
| 762 | (?$(5"r(B 30 (br . tr)) | 830 | (?$(5"r(B 0 (br . tr)) |
| 763 | (?$(5"s(B 0) | 831 | (?$(5"s(B 0) |
| 764 | (?$(5"t(B 0) | 832 | (?$(5"t(B 0) |
| 765 | (?$(5"u(B 0) | 833 | (?$(5"u(B 0) |
| @@ -814,9 +882,9 @@ Ligatures and special rules are processed." | |||
| 814 | (?$(5#H(B 0) | 882 | (?$(5#H(B 0) |
| 815 | (?$(5#I(B 0) | 883 | (?$(5#I(B 0) |
| 816 | (?$(5#J(B 0) | 884 | (?$(5#J(B 0) |
| 817 | (?$(5#K(B 40 (bc . tc)) | 885 | (?$(5#K(B 0 (br . tr)) |
| 818 | (?$(5#L(B 40 (bc . tc)) | 886 | (?$(5#L(B 0 (br . tr)) |
| 819 | (?$(5#M(B 40 (bc . tc)) | 887 | (?$(5#M(B 0 (br . tr)) |
| 820 | (?$(5#N(B 0) | 888 | (?$(5#N(B 0) |
| 821 | (?$(5#O(B 0) | 889 | (?$(5#O(B 0) |
| 822 | (?$(5#P(B 0) | 890 | (?$(5#P(B 0) |
| @@ -965,7 +1033,7 @@ Ligatures and special rules are processed." | |||
| 965 | ;; Determine composition priority and rule of the array of Glyphs. | 1033 | ;; Determine composition priority and rule of the array of Glyphs. |
| 966 | ;; Sort the glyphs with their priority. | 1034 | ;; Sort the glyphs with their priority. |
| 967 | 1035 | ||
| 968 | (defun devanagari-reorder-glyph-for-composition (glyph-alist) | 1036 | (defun devanagari-reorder-glyphs-for-composition (glyph-alist) |
| 969 | (let* ((pos 0) | 1037 | (let* ((pos 0) |
| 970 | (ordered-glyphs '())) | 1038 | (ordered-glyphs '())) |
| 971 | (while (< pos (length glyph-alist)) | 1039 | (while (< pos (length glyph-alist)) |
| @@ -978,7 +1046,7 @@ Ligatures and special rules are processed." | |||
| 978 | ;;(devanagari-compose-to-one-glyph "$(5"5!X![(B") => "2$(6!XP"5@![1(B" | 1046 | ;;(devanagari-compose-to-one-glyph "$(5"5!X![(B") => "2$(6!XP"5@![1(B" |
| 979 | 1047 | ||
| 980 | (defun devanagari-compose-to-one-glyph (devanagari-string) | 1048 | (defun devanagari-compose-to-one-glyph (devanagari-string) |
| 981 | (let* ((o-glyph-list (devanagari-reorder-glyph-for-composition | 1049 | (let* ((o-glyph-list (devanagari-reorder-glyphs-for-composition |
| 982 | (string-to-vector devanagari-string))) | 1050 | (string-to-vector devanagari-string))) |
| 983 | ;; List of glyphs to be composed. | 1051 | ;; List of glyphs to be composed. |
| 984 | (cmp-glyph-list (list (car (car o-glyph-list)))) | 1052 | (cmp-glyph-list (list (car (car o-glyph-list)))) |
| @@ -1075,36 +1143,6 @@ Ligatures and special rules are processed." | |||
| 1075 | ;; Summary | 1143 | ;; Summary |
| 1076 | ;; | 1144 | ;; |
| 1077 | 1145 | ||
| 1078 | ;;;###autoload | ||
| 1079 | (defun devanagari-compose-string (str) | ||
| 1080 | (let ((len (length str)) | ||
| 1081 | (src str) (dst "") rest match-b match-e) | ||
| 1082 | (while (string-match devanagari-composite-glyph-unit-examine src) | ||
| 1083 | (setq match-b (match-beginning 0) match-e (match-end 0)) | ||
| 1084 | (setq dst | ||
| 1085 | (concat dst | ||
| 1086 | (substring src 0 match-b) | ||
| 1087 | (devanagari-compose-to-one-glyph | ||
| 1088 | (char-to-glyph-devanagari | ||
| 1089 | (substring src match-b match-e))))) | ||
| 1090 | (setq src (substring src match-e))) | ||
| 1091 | (setq dst (concat dst src)) | ||
| 1092 | dst)) | ||
| 1093 | |||
| 1094 | ;;;###autoload | ||
| 1095 | (defun devanagari-compose-region (from to) | ||
| 1096 | (interactive "r") | ||
| 1097 | (save-restriction | ||
| 1098 | (narrow-to-region from to) | ||
| 1099 | (goto-char (point-min)) | ||
| 1100 | (while (re-search-forward devanagari-composite-glyph-unit-examine nil t) | ||
| 1101 | (let* ((match-b (match-beginning 0)) (match-e (match-end 0)) | ||
| 1102 | (cmps (devanagari-compose-to-one-glyph | ||
| 1103 | (char-to-glyph-devanagari | ||
| 1104 | (buffer-substring match-b match-e))))) | ||
| 1105 | (delete-region match-b match-e) | ||
| 1106 | (insert cmps))))) | ||
| 1107 | |||
| 1108 | ;; | 1146 | ;; |
| 1109 | ;; Decomposition of composite font. | 1147 | ;; Decomposition of composite font. |
| 1110 | ;; | 1148 | ;; |
| @@ -1117,12 +1155,12 @@ Ligatures and special rules are processed." | |||
| 1117 | 1155 | ||
| 1118 | (defvar devanagari-decomposition-rules | 1156 | (defvar devanagari-decomposition-rules |
| 1119 | '( | 1157 | '( |
| 1120 | (?$(5"p(B -20) | 1158 | (?$(5"p(B -10) |
| 1121 | ) | 1159 | ) |
| 1122 | ) | 1160 | ) |
| 1123 | 1161 | ||
| 1124 | (defun devanagari-reorder-glyph-for-decomposition (glyphlist) | 1162 | (defun devanagari-reorder-glyphs-for-decomposition (glyphlist) |
| 1125 | "This function re-orders glyph list." | 1163 | "This function re-orders glyph list for decomposition." |
| 1126 | (sort glyphlist | 1164 | (sort glyphlist |
| 1127 | '(lambda (x y) | 1165 | '(lambda (x y) |
| 1128 | (let ((xx (assoc x devanagari-decomposition-rules)) | 1166 | (let ((xx (assoc x devanagari-decomposition-rules)) |
| @@ -1131,18 +1169,17 @@ Ligatures and special rules are processed." | |||
| 1131 | (if (null yy) (setq yy 0)) | 1169 | (if (null yy) (setq yy 0)) |
| 1132 | (< xx yy))))) | 1170 | (< xx yy))))) |
| 1133 | 1171 | ||
| 1134 | (defun devanagari-decompose-char (char) | 1172 | (defun devanagari-decompose-char (glyph) |
| 1135 | "This function decomposes one Devanagari composite character to | 1173 | "This function decomposes one Devanagari composite glyph to |
| 1136 | basic Devanagari character." | 1174 | basic Devanagari characters as a string." |
| 1137 | (let ((glyphlist (decompose-composite-char char))) | 1175 | (let ((glyphlist |
| 1138 | (if (not (listp glyphlist)) | 1176 | (if (eq (car (split-char glyph)) 'composition) |
| 1139 | (setq glyphlist (list glyphlist))) | 1177 | (string-to-list (decompose-composite-char glyph)) |
| 1178 | (list glyph)))) | ||
| 1140 | (setq glyphlist (devanagari-normalize-narrow-glyph glyphlist)) | 1179 | (setq glyphlist (devanagari-normalize-narrow-glyph glyphlist)) |
| 1141 | (mapconcat '(lambda (x) (let ((char (get-char-code-property | 1180 | (setq glyphlist (devanagari-reorder-glyphs-for-decomposition glyphlist)) |
| 1142 | x 'glyph-to-char))) | 1181 | (string-conversion-by-rule |
| 1143 | (if (null char) (char-to-string x) char))) | 1182 | (mapconcat 'char-to-string glyphlist "") 'glyph-to-char))) |
| 1144 | (devanagari-reorder-glyph-for-decomposition glyphlist) | ||
| 1145 | ""))) | ||
| 1146 | 1183 | ||
| 1147 | ;;;###autoload | 1184 | ;;;###autoload |
| 1148 | (defun devanagari-decompose-string (str) | 1185 | (defun devanagari-decompose-string (str) |
| @@ -1169,7 +1206,43 @@ basic Devanagari character string." | |||
| 1169 | (delete-char -1) | 1206 | (delete-char -1) |
| 1170 | (insert decmps))))) | 1207 | (insert decmps))))) |
| 1171 | 1208 | ||
| 1209 | ;;; | ||
| 1210 | ;;; Composition | ||
| 1211 | ;;; | ||
| 1212 | |||
| 1213 | ;;;###autoload | ||
| 1214 | (defun devanagari-compose-string (str &rest langs) | ||
| 1215 | (let ((len (length str)) | ||
| 1216 | (src (devanagari-decompose-string str)) (dst "") rest match-b match-e) | ||
| 1217 | (while (string-match devanagari-composite-glyph-unit src) | ||
| 1218 | (setq match-b (match-beginning 0) match-e (match-end 0)) | ||
| 1219 | (setq dst | ||
| 1220 | (concat dst | ||
| 1221 | (substring src 0 match-b) | ||
| 1222 | (devanagari-compose-to-one-glyph | ||
| 1223 | (apply | ||
| 1224 | 'char-to-glyph-devanagari | ||
| 1225 | (cons (substring src match-b match-e) | ||
| 1226 | langs))))) | ||
| 1227 | (setq src (substring src match-e))) | ||
| 1228 | (setq dst (concat dst src)) | ||
| 1229 | dst)) | ||
| 1172 | 1230 | ||
| 1231 | ;;;###autoload | ||
| 1232 | (defun devanagari-compose-region (from to &rest langs) | ||
| 1233 | (interactive "r") | ||
| 1234 | (save-restriction | ||
| 1235 | (narrow-to-region from to) | ||
| 1236 | (goto-char (point-min)) | ||
| 1237 | (while (re-search-forward devanagari-composite-glyph-unit nil t) | ||
| 1238 | (let* ((match-b (match-beginning 0)) (match-e (match-end 0)) | ||
| 1239 | (cmps (devanagari-compose-to-one-glyph | ||
| 1240 | (apply | ||
| 1241 | 'char-to-glyph-devanagari | ||
| 1242 | (cons (buffer-substring match-b match-e) | ||
| 1243 | langs))))) | ||
| 1244 | (delete-region match-b match-e) | ||
| 1245 | (insert cmps))))) | ||
| 1173 | 1246 | ||
| 1174 | ;; For pre-write and post-read conversion | 1247 | ;; For pre-write and post-read conversion |
| 1175 | 1248 | ||
| @@ -1191,10 +1264,29 @@ basic Devanagari character string." | |||
| 1191 | (devanagari-decompose-region (point-min) (point-max)) | 1264 | (devanagari-decompose-region (point-min) (point-max)) |
| 1192 | (devanagari-to-indian-region (point-min) (point-max)))) | 1265 | (devanagari-to-indian-region (point-min) (point-max)))) |
| 1193 | 1266 | ||
| 1267 | |||
| 1268 | ;; For input/output of ITRANS | ||
| 1269 | |||
| 1270 | ;;;###autoload | ||
| 1271 | (defun devanagari-encode-itrans-region (from to) | ||
| 1272 | (interactive "r") | ||
| 1273 | (save-restriction | ||
| 1274 | (narrow-to-region from to) | ||
| 1275 | (devanagari-decompose-to-is13194-region (point-min) (point-max)) | ||
| 1276 | (indian-encode-itrans-region (point-min) (point-max)))) | ||
| 1277 | |||
| 1278 | ;;;###autoload | ||
| 1279 | (defun devanagari-decode-itrans-region (from to) | ||
| 1280 | (interactive "r") | ||
| 1281 | (save-restriction | ||
| 1282 | (narrow-to-region from to) | ||
| 1283 | (indian-decode-itrans-region (point-min) (point-max)) | ||
| 1284 | (devanagari-compose-from-is13194-region (point-min) (point-max)))) | ||
| 1285 | |||
| 1194 | ;; | 1286 | ;; |
| 1195 | (provide 'language/devan-util) | 1287 | (provide 'language/devan-util) |
| 1196 | 1288 | ||
| 1197 | ;;; Local Variables: | 1289 | ;;; Local Variables: |
| 1198 | ;;; generated-autoload-file: "../loaddefs.el" | 1290 | ;;; generated-autoload-file: "../loaddefs.el" |
| 1199 | ;;; End: | 1291 | ;;; End: |
| 1200 | ;;; devan-util.el ends here | 1292 | ;;; devan-util.el end here |
diff --git a/lisp/language/devanagari.el b/lisp/language/devanagari.el index 8c6a003af0a..2af93a05487 100644 --- a/lisp/language/devanagari.el +++ b/lisp/language/devanagari.el | |||
| @@ -19,9 +19,8 @@ | |||
| 19 | ;; GNU General Public License for more details. | 19 | ;; GNU General Public License for more details. |
| 20 | 20 | ||
| 21 | ;; You should have received a copy of the GNU General Public License | 21 | ;; You should have received a copy of the GNU General Public License |
| 22 | ;; along with GNU Emacs; see the file COPYING. If not, write to the | 22 | ;; along with GNU Emacs; see the file COPYING. If not, write to |
| 23 | ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 23 | ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. |
| 24 | ;; Boston, MA 02111-1307, USA. | ||
| 25 | 24 | ||
| 26 | ;;; Commentary: | 25 | ;;; Commentary: |
| 27 | 26 | ||
| @@ -52,6 +51,10 @@ | |||
| 52 | "Devanagari" '("quail-devanagari-itrans" quail-use-package | 51 | "Devanagari" '("quail-devanagari-itrans" quail-use-package |
| 53 | "quail/devanagari")) | 52 | "quail/devanagari")) |
| 54 | 53 | ||
| 54 | (register-input-method | ||
| 55 | "Devanagari" '("quail-devanagari-hindi-transliteration" quail-use-package | ||
| 56 | "quail/devanagari")) | ||
| 57 | |||
| 55 | (defun setup-devanagari-environment () | 58 | (defun setup-devanagari-environment () |
| 56 | (setq coding-category-iso-8-1 'in-is13194-devanagari) | 59 | (setq coding-category-iso-8-1 'in-is13194-devanagari) |
| 57 | 60 | ||
diff --git a/lisp/language/indian.el b/lisp/language/indian.el index 2e553e573cb..9f86f82e90c 100644 --- a/lisp/language/indian.el +++ b/lisp/language/indian.el | |||
| @@ -19,9 +19,8 @@ | |||
| 19 | ;; GNU General Public License for more details. | 19 | ;; GNU General Public License for more details. |
| 20 | 20 | ||
| 21 | ;; You should have received a copy of the GNU General Public License | 21 | ;; You should have received a copy of the GNU General Public License |
| 22 | ;; along with GNU Emacs; see the file COPYING. If not, write to the | 22 | ;; along with GNU Emacs; see the file COPYING. If not, write to |
| 23 | ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 23 | ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. |
| 24 | ;; Boston, MA 02111-1307, USA. | ||
| 25 | 24 | ||
| 26 | ;;; Commentary: | 25 | ;;; Commentary: |
| 27 | 26 | ||
| @@ -268,11 +267,12 @@ | |||
| 268 | (defvar itrans-indian-regexp | 267 | (defvar itrans-indian-regexp |
| 269 | (let ((vowel "[(5$(B-(52(B]") | 268 | (let ((vowel "[(5$(B-(52(B]") |
| 270 | (consonant "[(53(B-(5X(B]") | 269 | (consonant "[(53(B-(5X(B]") |
| 271 | (vowel-sign "[(5Z(B-(5g(B]") | 270 | (matra "[(5Z(B-(5g(B]") |
| 272 | (misc "[(5q(B-(5z(B]") | 271 | (misc "[(5q(B-(5z(B]") |
| 273 | (lpre "\\(") (rpre "\\)") (orre "\\|")) | 272 | (lpre "\\(") (rpre "\\)") (orre "\\|")) |
| 274 | nil)) ; not yet prepared. | 273 | (concat misc orre |
| 275 | 274 | lpre consonant matra "?" rpre orre | |
| 275 | vowel))) | ||
| 276 | 276 | ||
| 277 | ;; | 277 | ;; |
| 278 | ;; IS13194 - ITRANS conversion table for string matching above regexp. | 278 | ;; IS13194 - ITRANS conversion table for string matching above regexp. |
| @@ -324,6 +324,19 @@ positions (integers or markers) specifying the stretch of the region." | |||
| 324 | ;; Utility program to convert from IS 13194 to ITRANS in specified region. | 324 | ;; Utility program to convert from IS 13194 to ITRANS in specified region. |
| 325 | ;; | 325 | ;; |
| 326 | 326 | ||
| 327 | ;;;;;; not yet prepared. | 327 | (defun indian-encode-itrans-region (from to) |
| 328 | 328 | "Convert indian region to ITRANS mnemonics." | |
| 329 | (interactive "r") | ||
| 330 | (save-restriction | ||
| 331 | (narrow-to-region from to) | ||
| 332 | (goto-char (point-min)) | ||
| 333 | (while (re-search-forward itrans-indian-regexp nil t) | ||
| 334 | (let* ((indian (buffer-substring (match-beginning 0) (match-end 0))) | ||
| 335 | (ch (car (rassoc indian indian-itrans-alist)))) | ||
| 336 | (if ch | ||
| 337 | (progn | ||
| 338 | (delete-region (match-beginning 0) (match-end 0)) | ||
| 339 | (insert ch))))) | ||
| 340 | (goto-char (point-min)))) | ||
| 341 | |||
| 329 | ;;; indian.el ends here | 342 | ;;; indian.el ends here |