diff options
| author | Kenichi Handa | 2010-02-26 21:40:46 +0900 |
|---|---|---|
| committer | Kenichi Handa | 2010-02-26 21:40:46 +0900 |
| commit | f88cc4d6dd9ca8cfbae25aa1d8f1912d54444aca (patch) | |
| tree | 38e85e04327f47e615cf2abc5ba920a849bb0425 | |
| parent | 06aac9016fc074f856a4b374572024a68784e630 (diff) | |
| download | emacs-f88cc4d6dd9ca8cfbae25aa1d8f1912d54444aca.tar.gz emacs-f88cc4d6dd9ca8cfbae25aa1d8f1912d54444aca.zip | |
Fix Myanmar OTF support
| -rw-r--r-- | lisp/ChangeLog | 11 | ||||
| -rw-r--r-- | lisp/international/characters.el | 3 | ||||
| -rw-r--r-- | lisp/international/fontset.el | 4 | ||||
| -rw-r--r-- | lisp/language/burmese.el | 22 | ||||
| -rw-r--r-- | src/ChangeLog | 2 | ||||
| -rw-r--r-- | src/ftfont.c | 18 |
6 files changed, 47 insertions, 13 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 59bd441f0d8..fd603c38565 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,14 @@ | |||
| 1 | 2010-02-26 Kenichi Handa <handa@m17n.org> | ||
| 2 | |||
| 3 | * language/burmese.el: Fix entries in composition-function-table. | ||
| 4 | (myanmar-composable-pattern): New variable. | ||
| 5 | |||
| 6 | * international/fontset.el (setup-default-fontset): Add an entry | ||
| 7 | for myanmar. | ||
| 8 | |||
| 9 | * international/characters.el (script-list): Add Myanmar | ||
| 10 | Extended-A. | ||
| 11 | |||
| 1 | 2010-02-25 Alan Mackenzie <acm@muc.de> | 12 | 2010-02-25 Alan Mackenzie <acm@muc.de> |
| 2 | 13 | ||
| 3 | * progmodes/cc-engine.el (c-clear-<-pair-props) | 14 | * progmodes/cc-engine.el (c-clear-<-pair-props) |
diff --git a/lisp/international/characters.el b/lisp/international/characters.el index 426ea0fdabb..fb7c573ceac 100644 --- a/lisp/international/characters.el +++ b/lisp/international/characters.el | |||
| @@ -1124,7 +1124,7 @@ Setup char-width-table appropriate for non-CJK language environment." | |||
| 1124 | (#x0E00 #x0E5F thai) | 1124 | (#x0E00 #x0E5F thai) |
| 1125 | (#x0E80 #x0EDF lao) | 1125 | (#x0E80 #x0EDF lao) |
| 1126 | (#x0F00 #x0FFF tibetan) | 1126 | (#x0F00 #x0FFF tibetan) |
| 1127 | (#x1000 #x105F myanmar) | 1127 | (#x1000 #x109F myanmar) |
| 1128 | (#x10A0 #x10FF georgian) | 1128 | (#x10A0 #x10FF georgian) |
| 1129 | (#x1100 #x11FF hangul) | 1129 | (#x1100 #x11FF hangul) |
| 1130 | (#x1200 #x139F ethiopic) | 1130 | (#x1200 #x139F ethiopic) |
| @@ -1151,6 +1151,7 @@ Setup char-width-table appropriate for non-CJK language environment." | |||
| 1151 | (#x3400 #x9FAF han) | 1151 | (#x3400 #x9FAF han) |
| 1152 | (#xA000 #xA4CF yi) | 1152 | (#xA000 #xA4CF yi) |
| 1153 | (#xAA00 #xAA5F cham) | 1153 | (#xAA00 #xAA5F cham) |
| 1154 | (#xAA60 #xAA7B myanmar) | ||
| 1154 | (#xAA80 #xAADF tai-viet) | 1155 | (#xAA80 #xAADF tai-viet) |
| 1155 | (#xAC00 #xD7AF hangul) | 1156 | (#xAC00 #xD7AF hangul) |
| 1156 | (#xF900 #xFAFF han) | 1157 | (#xF900 #xFAFF han) |
diff --git a/lisp/international/fontset.el b/lisp/international/fontset.el index 4a2173fb27c..767cff850f6 100644 --- a/lisp/international/fontset.el +++ b/lisp/international/fontset.el | |||
| @@ -415,6 +415,9 @@ | |||
| 415 | (sinhala ,(font-spec :registry "iso10646-1" :otf '(sinh nil (akhn)))) | 415 | (sinhala ,(font-spec :registry "iso10646-1" :otf '(sinh nil (akhn)))) |
| 416 | (malayalam ,(font-spec :registry "iso10646-1" :otf '(mlym nil (akhn)))) | 416 | (malayalam ,(font-spec :registry "iso10646-1" :otf '(mlym nil (akhn)))) |
| 417 | 417 | ||
| 418 | (myanmar ,(font-spec :registry "iso10646-1" :otf '(mymr)) | ||
| 419 | ,(font-spec :registry "iso10646-1" :script 'myanmar)) | ||
| 420 | |||
| 418 | (lao ,(font-spec :registry "iso10646-1" :otf '(lao\ nil nil (mark))) | 421 | (lao ,(font-spec :registry "iso10646-1" :otf '(lao\ nil nil (mark))) |
| 419 | ,(font-spec :registry "iso10646-1" :script 'lao) | 422 | ,(font-spec :registry "iso10646-1" :script 'lao) |
| 420 | (nil . "MuleLao-1")) | 423 | (nil . "MuleLao-1")) |
| @@ -548,7 +551,6 @@ | |||
| 548 | armenian | 551 | armenian |
| 549 | syriac | 552 | syriac |
| 550 | thaana | 553 | thaana |
| 551 | myanmar | ||
| 552 | georgian | 554 | georgian |
| 553 | cherokee | 555 | cherokee |
| 554 | canadian-aboriginal | 556 | canadian-aboriginal |
diff --git a/lisp/language/burmese.el b/lisp/language/burmese.el index a89ffe28f29..554cd7a482c 100644 --- a/lisp/language/burmese.el +++ b/lisp/language/burmese.el | |||
| @@ -36,7 +36,25 @@ | |||
| 36 | (sample-text . "Burmese (မ္ရန္မာ) မင္ဂလာပာ") | 36 | (sample-text . "Burmese (မ္ရန္မာ) မင္ဂလာပာ") |
| 37 | (documentation . t))) | 37 | (documentation . t))) |
| 38 | 38 | ||
| 39 | (set-char-table-range composition-function-table '(#x1000 . #x107F) | 39 | (defvar myanmar-composable-pattern |
| 40 | '(["[\x1000-\x107F\x200C\x200D]+" 0 font-shape-gstring])) | 40 | (let ((table |
| 41 | '(("K" . "[\u1004\u105A]\u103A\u1039") ; KINZI sequence | ||
| 42 | ("C" . "[\u1000-\u102A\u103F\u1041-\u1049\u104E\u105A-\u105D\u1061\u1065-\u1066\u106E\u1071\u1075\u1081\u108E\uAA60-\uAA6F\uAA71-\uAA76]") ; consonant and vowel letter | ||
| 43 | ("V" . "\u1039") ; VIRAMA | ||
| 44 | ("A" . "\u103A") ; ASAT | ||
| 45 | ("S" . "[\u1000-\u1019\u101C\u101E\u1020\u1021\u105A]") ; subscript | ||
| 46 | ("M" . "[\u103B-\u103E\105E-\1060]") ; medial | ||
| 47 | ("v" . "[\u102B-\u103A\u103C-\u103E\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A\u109C\uAA70]"))) ; vowel sign, etc. | ||
| 48 | (regexp "\\(K\\)?C\\(VS\\)?\\(VS\\)?A?M*v*")) | ||
| 49 | (let ((case-fold-search nil)) | ||
| 50 | (dolist (elt table) | ||
| 51 | (setq regexp (replace-regexp-in-string (car elt) (cdr elt) | ||
| 52 | regexp t t)))) | ||
| 53 | regexp)) | ||
| 54 | |||
| 55 | (let ((elt (list (vector myanmar-composable-pattern 0 'font-shape-gstring) | ||
| 56 | (vector "." 0 'font-shape-gstring)))) | ||
| 57 | (set-char-table-range composition-function-table '(#x1000 . #x107F) elt) | ||
| 58 | (set-char-table-range composition-function-table '(#xAA60 . #xAA7B) elt)) | ||
| 41 | 59 | ||
| 42 | ;; arch-tag: 8ba5f4cd-ef89-4008-b784-397edd0cb32e | 60 | ;; arch-tag: 8ba5f4cd-ef89-4008-b784-397edd0cb32e |
diff --git a/src/ChangeLog b/src/ChangeLog index 36e056b786d..f60b400b930 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,7 @@ | |||
| 1 | 2010-02-26 Kenichi Handa <handa@m17n.org> | 1 | 2010-02-26 Kenichi Handa <handa@m17n.org> |
| 2 | 2 | ||
| 3 | * ftfont.c (ftfont_get_open_type_spec): Fix parsing of otf_spec. | ||
| 4 | |||
| 3 | * xdisp.c (reseat_to_string): Fix previous change. | 5 | * xdisp.c (reseat_to_string): Fix previous change. |
| 4 | 6 | ||
| 5 | 2010-02-26 David Reitter <david.reitter@gmail.com> | 7 | 2010-02-26 David Reitter <david.reitter@gmail.com> |
diff --git a/src/ftfont.c b/src/ftfont.c index 492d03bb8bf..f4fe5b8e5c0 100644 --- a/src/ftfont.c +++ b/src/ftfont.c | |||
| @@ -663,19 +663,19 @@ ftfont_get_open_type_spec (Lisp_Object otf_spec) | |||
| 663 | else | 663 | else |
| 664 | spec->script_tag = 0x44464C54; /* "DFLT" */ | 664 | spec->script_tag = 0x44464C54; /* "DFLT" */ |
| 665 | otf_spec = XCDR (otf_spec); | 665 | otf_spec = XCDR (otf_spec); |
| 666 | val = XCAR (otf_spec); | 666 | spec->langsys_tag = 0; |
| 667 | if (! NILP (val)) | 667 | if (! NILP (otf_spec)) |
| 668 | OTF_SYM_TAG (val, spec->langsys_tag); | 668 | { |
| 669 | else | 669 | val = XCAR (otf_spec); |
| 670 | spec->langsys_tag = 0; | 670 | if (! NILP (val)) |
| 671 | OTF_SYM_TAG (val, spec->langsys_tag); | ||
| 672 | otf_spec = XCDR (otf_spec); | ||
| 673 | } | ||
| 671 | spec->nfeatures[0] = spec->nfeatures[1] = 0; | 674 | spec->nfeatures[0] = spec->nfeatures[1] = 0; |
| 672 | for (i = 0; i < 2; i++) | 675 | for (i = 0; i < 2 && ! NILP (otf_spec); i++, otf_spec = XCDR (otf_spec)) |
| 673 | { | 676 | { |
| 674 | Lisp_Object len; | 677 | Lisp_Object len; |
| 675 | 678 | ||
| 676 | otf_spec = XCDR (otf_spec); | ||
| 677 | if (NILP (otf_spec)) | ||
| 678 | break; | ||
| 679 | val = XCAR (otf_spec); | 679 | val = XCAR (otf_spec); |
| 680 | if (NILP (val)) | 680 | if (NILP (val)) |
| 681 | continue; | 681 | continue; |