Subject: Re: bug#35816: 26.2; set-frame-font cannot set some fonts which autocomplete suggests due to dashes in names. I.e. gnu-unifont

From: Lars Ingebrigtsen <[email-masked]>
Date: Wed, 11 Aug 2021 21:02:27 +0200

Vladimir Nikishkin <[email-masked]> writes:

> It's wrong in that if you type RET, Emacs rejects it.

Right.  I'm unable to reproduce the problem, because Debian seems to be
very careful about not doing any fonts that have name bits containing
hyphens (presumably because they're invalid):

(dolist (font (x-list-fonts "*"))
  (when (length> (split-string font "-") 15)
    (insert (format "%s\n" font))))

If somebody can reproduce this on a different OS, that'd be nice.  I
guess one way of trying to deal with this would be to check whether we
have an excessive number of segments, and if we do, then guess that
those belong in the name of the font and then do some DWIM.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no