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.
This commit is contained in:
Ali Ghaffaari
2025-04-09 16:24:08 +02:00
committed by Henrik Lissner
parent eae2529ed8
commit fda6bd4a44

View File

@ -102,10 +102,10 @@ easier."
(font (symbol-value font-var))) (font (symbol-value font-var)))
(condition-case e (condition-case e
(let ((scale (symbol-value (intern (format "+bidi-%s-font-scale" name))))) (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) (set-face-font (intern (format "+bidi-%s-face" name)) font)
(when (/= scale 1.0) (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))) scale)))
('error ('error
(if (string-prefix-p "Font not available" (error-message-string e)) (if (string-prefix-p "Font not available" (error-message-string e))