GNU bug report logs - #33019
26.1; can not set fontset as frame font by set-frame-font

Previous Next

Package: emacs;

Reported by: ynyaaa <at> gmail.com

Date: Thu, 11 Oct 2018 15:06:02 UTC

Severity: normal

Found in version 26.1

Full log


Message #41 received at 33019 <at> debbugs.gnu.org (full text, mbox):

From: ynyaaa <at> gmail.com
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 33019 <at> debbugs.gnu.org
Subject: Re: bug#33019: 26.1;
 can not set fontset as frame font by set-frame-font
Date: Sat, 13 Oct 2018 23:43:38 +0900
Eli Zaretskii <eliz <at> gnu.org> writes:
> If you use a font instead of :family, does the face work as expected?

Evaluating the form below, five U+4E00s are inserted with same glyphs.
C-u C-x = on each character shows the same information.

>              display: by this font (glyph code)
>    uniscribe:-outline-Noto Sans CJK JP Regular-normal-normal-normal-sans-17-*-*-*-p-*-iso8859-1 (#x2667)

(let ((prefix "-outline-Noto Serif CJK JP-normal-normal-normal-serif-*-*-*-*-p-*-"))
  (set-frame-font "Noto Mono")
  (set-fontset-font "fontset-default" '(#x4E00 . #x9FFF)
                    "Noto Sans CJK JP Regular")
  (insert "\x4E00"
          (propertize "\x4E00" 'face '(:family "Noto Serif CJK JP"))
          (propertize "\x4E00" 'face '(:font "Noto Serif CJK JP"))
          (propertize "\x4E00" 'face (list :font (concat prefix "iso10646-1")))
          (propertize "\x4E00" 'face (list :font (concat prefix "jisx0208-sjis")))
          ))

If set-frame-font and set-fontset-font are disabled, only the second
U+4E00 with :family face is shown by "Noto Serif CJK JP".
The rest four U+4E00s are shown by "游ゴシック", same as no font settings.

(let ((prefix "-outline-Noto Serif CJK JP-normal-normal-normal-serif-17-*-*-*-p-*-"))
  (insert "\x4E00"
          (propertize "\x4E00" 'face '(:family "Noto Serif CJK JP"))
          (propertize "\x4E00" 'face '(:font "Noto Serif CJK JP"))
          (propertize "\x4E00" 'face (list :font (concat prefix "iso10646-1")))
          (propertize "\x4E00" 'face (list :font (concat prefix "jisx0208-sjis")))
          ))

Face with :font property seems not working.
Then I tried with ascii characters.

(let ((prefix "-outline-Verdana-normal-normal-normal-sans-*-*-*-*-p-*-"))
  (insert "A"
          (propertize "A" 'face '(:family "Verdana"))
          (propertize "A" 'face '(:font "Verdana"))
          (propertize "A" 'face (list :font (concat prefix "iso8859-1")))
          (propertize "A" 'face (list :font (concat prefix "iso10646-1")))
          ))

Only the second A is shown by "Verdana",
the rest are shown by "Courier New".




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

Previous Next


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