GNU bug report logs -
#54562
28.0.91; Emoji sequence not composed
Previous Next
Full log
Message #125 received at 54562 <at> debbugs.gnu.org (full text, mbox):
> From: Andreas Schwab <schwab <at> linux-m68k.org>
> Cc: luangruo <at> yahoo.com, rpluim <at> gmail.com, 54562 <at> debbugs.gnu.org,
> larsi <at> gnus.org
> Date: Mon, 28 Mar 2022 19:39:43 +0200
>
> On Mär 28 2022, Eli Zaretskii wrote:
>
> > Try this (only very lightly tested):
> >
> > (defun fonts-supporting-char (test-char)
>
> Doesn't work. It claims support for a lot of fonts that don't contain
> that character.
Try this fixed version instead:
(defun fonts-supporting-char (test-char)
(let* ((inhibit-compacting-font-caches t)
(test-str (string test-char))
(frame (selected-frame))
(fnt-list
(delete-dups
(x-list-fonts "-*-*-medium-r-normal-*-*-*-*-*-*-iso10646-1"
'default frame)))
fspec fonts-for-char ffont font-obj glyphs)
(dolist (fnt fnt-list)
(setq fspec (ignore-errors (font-spec :name fnt)))
(if fspec
(setq ffont (find-font fspec frame)))
(when ffont
(setq font-obj (open-font ffont nil frame))
(when font-obj
(setq glyphs (font-get-glyphs font-obj 0 1 test-str))
(if (and (vectorp glyphs) (aref glyphs 0))
(push (symbol-name (font-get font-obj :family))
fonts-for-char)))))
(clear-font-cache)
fonts-for-char))
This bug report was last modified 3 years and 133 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.