From fda6bd4a4436645a971d582d550dd4c5995e7e76 Mon Sep 17 00:00:00 2001 From: Ali Ghaffaari Date: Wed, 9 Apr 2025 16:24:08 +0200 Subject: [PATCH] fix(bidi): set the font for Arabic characters In function `+bidi--set-font`, the character set was incorrectly hardcoded to `'hebrew` instead of using the provided character set `name` parameter. This caused `+bidi-arabic-font` to have no effect when set. Additionally, setting the scale throws an error: ``` string-match-p: Wrong type argument: stringp, DejaVu\ Sans ``` Converting the font family property to string fixed the issue. --- modules/input/bidi/config.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/input/bidi/config.el b/modules/input/bidi/config.el index 6c5ec39cf..0f1a8b0cf 100644 --- a/modules/input/bidi/config.el +++ b/modules/input/bidi/config.el @@ -102,10 +102,10 @@ easier." (font (symbol-value font-var))) (condition-case e (let ((scale (symbol-value (intern (format "+bidi-%s-font-scale" name))))) - (set-fontset-font t 'hebrew font) + (set-fontset-font t name font) (set-face-font (intern (format "+bidi-%s-face" name)) font) (when (/= scale 1.0) - (setf (alist-get (font-get font :family) face-font-rescale-alist nil nil #'equal) + (setf (alist-get (symbol-name (font-get font :family)) face-font-rescale-alist nil nil #'equal) scale))) ('error (if (string-prefix-p "Font not available" (error-message-string e))