changeset 109984:92cc550cda9a

Add Arabic support.
author Kenichi Handa <handa@m17n.org>
date Wed, 25 Aug 2010 14:13:27 +0900
parents 637005c4c3ca
children d2bad2ecc287
files etc/ChangeLog etc/HELLO lisp/ChangeLog lisp/international/fontset.el lisp/international/mule-cmds.el lisp/language/misc-lang.el
diffstat 6 files changed, 32 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/etc/ChangeLog	Thu Aug 19 07:55:30 2010 +0200
+++ b/etc/ChangeLog	Wed Aug 25 14:13:27 2010 +0900
@@ -1,3 +1,7 @@
+2010-08-25  Kenichi Handa  <handa@m17n.org>
+
+	* HELLO: Change designation sequences for Arabic text.
+
 2010-08-14  Eli Zaretskii  <eliz@gnu.org>
 
 	* tutorials/TUTORIAL.he: Use MAQAF instead of hyphen where appropriate.
--- a/etc/HELLO	Thu Aug 19 07:55:30 2010 +0200
+++ b/etc/HELLO	Wed Aug 25 14:13:27 2010 +0900
@@ -4,7 +4,7 @@
   Europe: ,A!(BHola!, Gr,A|_(B Gott, Hyv,Add(B p,Ad(Biv,Add(B, Tere ,Au(Bhtust, Bon,Cu(Bu
           Cze,B6f(B!, Dobr,B}(B den, ,L7T`PRabRcYbU(B!, ,FCei\(B ,Fsar(B, $,1J2J0J;J0J@JOJ=J1J0(B
   Africa: $(3!A!,!>(B
-  Middle/Near East: ,Hylem(B, ,GGdSqdGe(B ,GYdjce(B
+  Middle/Near East: ,Hylem(B, $,1-g.$-s.1.$-g.%(B $,1-y.$.*.#.%(B
   South Asia: $,19h9n9x:-9d:'(B, $,15h5n5x6-5d6'(B, $,1?(?.?8?M>u?>?0(B, $,1@H@N@X@m@5@^@P@"(B, $,1;6;A;#;?;,;G(B,
               $,1AFAzB4AvB=B AqB*(B, $,1<U<C<5<m<5<N<m(B, $,1=h=n=x>-=U=~=p=B(B, $(7"7"!#C!;"E"S"G!;"7"2"[!;"D"["#"G!>(B
   South East Asia: $,1\'\f\:\V\4\?\]\:(B, (1JP:R-4U(B, $,1H9H$HZHYH"H<HLH5HK(B, ,TJGQJ4U$CQ:(B, Ch,1`(Bo b,1U(Bn
@@ -16,7 +16,7 @@
 LANGUAGE (NATIVE NAME)	HELLO
 ----------------------	-----
 Amharic ($,1O M[MmN{(B)	$,1M`MKM](B
-Arabic $,1ro(B(,GGdYQHjqI(B)	,GGdSqdGe(B ,GYdjce(B
+Arabic $,1ro(B($,1-g.$-y-q-h.*.1-i(B)	$,1-g.$-s.1.$-g.%(B $,1-y.$.*.#.%(B
 Bengali ($,17,7>6b727>(B)	$,17(7.787M6u7>70(B
 Braille	$,2(3(1('('(5(B
 Burmese ($,1H9H\H4HZH9HL(B)	$,1H9H$HZHYH"H<HLH5HK(B
--- a/lisp/ChangeLog	Thu Aug 19 07:55:30 2010 +0200
+++ b/lisp/ChangeLog	Wed Aug 25 14:13:27 2010 +0900
@@ -1,3 +1,11 @@
+2010-08-25  Kenichi Handa  <handa@m17n.org>
+
+	* language/misc-lang.el ("Arabic"): New language environment.
+	Setup composition-function-table for Arabic characters.
+
+	* international/fontset.el (setup-default-fontset): Fix typo for
+	arabic OTF spec (fini->fina).
+
 2010-08-18  Stefan Monnier  <monnier@iro.umontreal.ca>
 
 	* simple.el (prog-mode-map): New var.
--- a/lisp/international/fontset.el	Thu Aug 19 07:55:30 2010 +0200
+++ b/lisp/international/fontset.el	Wed Aug 25 14:13:27 2010 +0900
@@ -433,7 +433,7 @@
 	       (nil . "koi8-r"))
 
      (arabic ,(font-spec :registry "iso10646-1"
-			 :otf '(arab nil (init medi fini liga)))
+			 :otf '(arab nil (init medi fina liga)))
 	     (nil . "MuleArabic-0")
 	     (nil . "MuleArabic-1")
 	     (nil . "MuleArabic-2")
--- a/lisp/international/mule-cmds.el	Thu Aug 19 07:55:30 2010 +0200
+++ b/lisp/international/mule-cmds.el	Wed Aug 25 14:13:27 2010 +0900
@@ -2179,7 +2179,7 @@
     ("af" . "Latin-1") ; Afrikaans
     ("am" "Ethiopic" utf-8) ; Amharic
     ("an" . "Latin-9") ; Aragonese
-    ; ar Arabic glibc uses 8859-6
+    ("ar" . "Arabic")
     ; as Assamese
     ; ay Aymara
     ("az" . "UTF-8") ; Azerbaijani
--- a/lisp/language/misc-lang.el	Thu Aug 19 07:55:30 2010 +0200
+++ b/lisp/language/misc-lang.el	Wed Aug 25 14:13:27 2010 +0900
@@ -40,8 +40,9 @@
 IPA is International Phonetic Alphabet for English, French, German
 and Italian.")))
 
-;; This is for Arabic.  But, as we still don't have Arabic language
-;; support, we at least define a coding system here.
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; Arabic
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
 (define-coding-system 'iso-8859-6
   "ISO-8859-6 based encoding (MIME:ISO-8859-6)."
@@ -58,6 +59,19 @@
   :mime-charset 'windows-1256)
 (define-coding-system-alias 'cp1256 'windows-1256)
 
+(set-language-info-alist
+ "Arabic" '((charset unicode)
+	    (coding-system utf-8 iso-8859-6 windows-1256)
+	    (coding-priority utf-8 iso-8859-6 windows-1256)
+	    (input-method . "arabic")
+	    (sample-text . "Arabic	السّلام عليكم")
+	    (documentation . "Bidirectional editing is supported.")))
+
+(set-char-table-range
+ composition-function-table
+ '(#x600 . #x6FF)
+ (list ["[\u0600-\u06FF]+" 0 font-shape-gstring]))
+
 (provide 'misc-lang)
 
 ;; arch-tag: 6953585c-1a1a-4c09-be82-a2518afb6074