summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2021-09-27 12:28:54 +0300
committerEli Zaretskii <eliz@gnu.org>2021-09-27 12:28:54 +0300
commit2403deca2bcffc62ff80e4c90a61fea1ea30a768 (patch)
tree86f1e2222a7f8a07fc46ef380d7015a0564c1507
parent129efd9c0b05610794cbfbb4d88facda435a8fe6 (diff)
downloademacs-2403deca2bcffc62ff80e4c90a61fea1ea30a768.tar.gz
emacs-2403deca2bcffc62ff80e4c90a61fea1ea30a768.tar.bz2
emacs-2403deca2bcffc62ff80e4c90a61fea1ea30a768.zip
Minor fix in 'w32-find-non-USB-fonts'
* lisp/term/w32-win.el (w32--filter-USB-scripts): Handle representative characters given as a vector, not a list.
-rw-r--r--lisp/term/w32-win.el8
1 files changed, 6 insertions, 2 deletions
diff --git a/lisp/term/w32-win.el b/lisp/term/w32-win.el
index 80afcb36040..5d1dc606676 100644
--- a/lisp/term/w32-win.el
+++ b/lisp/term/w32-win.el
@@ -532,7 +532,7 @@ characters from these blocks.")
(let (val)
(dolist (elt script-representative-chars)
(let ((subranges w32-no-usb-subranges)
- (chars (cdr elt))
+ (chars (append (cdr elt) nil)) ; handle vectors as well
ch found subrange)
(while (and (consp chars) (not found))
(setq ch (car chars)
@@ -595,7 +595,11 @@ default font on FRAME, or its best approximation."
0 nchars script-chars)
'[nil]))
;; Does this font support ALL of the script's
- ;; representative characters?
+ ;; representative characters? Note that, when the
+ ;; representative characters are specified as a
+ ;; vector, this is a more stringent test than font
+ ;; selection does, because supporting _any_
+ ;; character from the vector is enough.
(setq idx 0)
(while (and (< idx nchars) (not (null (aref glyphs idx))))
(setq idx (1+ idx)))