emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 44fcab04f6a: Enable the system's Arabic and Khmer fonts under And


From: Po Lu
Subject: master 44fcab04f6a: Enable the system's Arabic and Khmer fonts under Android
Date: Mon, 15 Jan 2024 22:08:51 -0500 (EST)

branch: master
commit 44fcab04f6a346e602f00a6d9f5b0e6f0dbeb5e0
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>

    Enable the system's Arabic and Khmer fonts under Android
    
    * lisp/international/fontset.el (setup-default-fontset): If
    `android', search for Arabic or Khmer fonts with script tags,
    not OTF features.
---
 lisp/international/fontset.el | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/lisp/international/fontset.el b/lisp/international/fontset.el
index 2c461a7f7ab..33e444507c4 100644
--- a/lisp/international/fontset.el
+++ b/lisp/international/fontset.el
@@ -645,8 +645,14 @@
               (nil . "microsoft-cp1251")
               (nil . "koi8-r"))
 
-     (arabic ,(font-spec :registry "iso10646-1"
-                        :otf '(arab nil (init medi fina liga)))
+     (arabic ,(if (featurep 'android)
+                  ;; The Android font driver does not support the
+                  ;; detection of OTF tags but all fonts installed on
+                  ;; Android with Arabic characters provide shaping
+                  ;; information required for displaying Arabic text.
+                  (font-spec :registry "iso10646-1" :script 'arabic)
+                (font-spec :registry "iso10646-1"
+                          :otf '(arab nil (init medi fina liga))))
             (nil . "MuleArabic-0")
             (nil . "MuleArabic-1")
             (nil . "MuleArabic-2")
@@ -657,7 +663,9 @@
      (hebrew ,(font-spec :registry "iso10646-1" :script 'hebrew)
             (nil . "ISO8859-8"))
 
-     (khmer ,(font-spec :registry "iso10646-1" :otf '(khmr nil (pres))))
+     (khmer ,(if (featurep 'android)
+                 (font-spec :registry "iso10646-1" :script 'khmer)
+               (font-spec :registry "iso10646-1" :otf '(khmr nil (pres)))))
 
      (kana (nil . "JISX0208*")
           (nil . "GB2312.1980-0")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]