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

Previous Next

Package: emacs;

Reported by: Vladimir Nikishkin <lockywolf <at> gmail.com>

Date: Tue, 21 May 2019 02:07:01 UTC

Severity: normal

Found in version 26.2

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: lockywolf <at> gmail.com, schwab <at> linux-m68k.org, 35816 <at> debbugs.gnu.org
Subject: bug#35816: 26.2; set-frame-font cannot set some fonts which autocomplete suggests due to dashes in names. I.e. gnu-unifont
Date: Thu, 12 Aug 2021 15:48:28 +0300
> From: Lars Ingebrigtsen <larsi <at> gnus.org>
> Cc: schwab <at> linux-m68k.org,  lockywolf <at> gmail.com,  35816 <at> debbugs.gnu.org
> Date: Thu, 12 Aug 2021 14:27:49 +0200
> 
> Eli Zaretskii <eliz <at> gnu.org> writes:
> 
> > set-frame-font is not the only API that accepts font names, and XLFD
> > is not the only format of fonts Emacs accepts
> 
> This bug was only about XLFD fonts, though.

AFAIR, we eventually convert all the other forms into XLFD format.

> > Also, perhaps set-face-font can now accept font names that
> > include a dash which not only precedes a numeric size, in which case
> > at least the doc string of set-face-font should be amended?
> 
> I didn't see anything about dashes in the set-face-font doc string?

  The format of the font string specification varies based on the font
  system in use, but it can commonly be an X Logical Font
  Description (XLFD) string, or a simpler string like "Courier-10"
  or "courier:size=10".

> > Finally, I think it would be good to have some tests for these issues,
> > as much as possible (we cannot set fonts in batch mode, but perhaps
> > using lower-level APIs that parse the font spec would allow such
> > tests).
> 
> I didn't find any Lisp-level interfaces that exposed this yesterday, but
> I now see that `(font-spec :name ...)' was what I was looking for, so
> I've added a couple of tests.

Thanks!




This bug report was last modified 3 years and 281 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.