GNU bug report logs - #39339
26.3; set-fontset-font does not replace some glyphs

Previous Next

Package: emacs;

Reported by: ynyaaa <at> gmail.com

Date: Wed, 29 Jan 2020 03:56:02 UTC

Severity: normal

Tags: notabug

Found in version 26.3

Done: Stefan Kangas <stefan <at> marxist.se>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 39339 in the body.
You can then email your comments to 39339 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#39339; Package emacs. (Wed, 29 Jan 2020 03:56:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to ynyaaa <at> gmail.com:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 29 Jan 2020 03:56:02 GMT) Full text and rfc822 format available.

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

From: ynyaaa <at> gmail.com
To: bug-gnu-emacs <at> gnu.org
Subject: 26.3; set-fontset-font does not replace some glyphs
Date: Wed, 29 Jan 2020 12:55:31 +0900
I installed Noto fonts, and tried to set up fontset composed of
"Noto Sans Mono" and "Noto Sans Mono CJK JP Regular".
For some characters "Noto Sans Mono CJK JP Regular" has wide glyphs.

Evaluating the form below, only characters
  #x00A7 #x00B1 #x00B6 #x00D7 #x00F7 #x02C7 #x02C9 #x02CA #x02CB #x02D9
are displayed with wide glyphs,
and other characters listed in the form are displayed with narrow glyphs.

(let ((base-font "Noto Sans Mono")
      (alt-font "Noto Sans Mono CJK JP Regular")
      (l '(#x00A7 #x00B1 #x00B6 #x00D7 #x00F7
                  #x02C7 #x02C9 #x02CA #x02CB #x02D9
                  #x2015 #x2016 #x2020 #x2021 #x2025 #x2027 #x2030
                  #x2035 #x203B #x2042 #x2051
                  #x2100 #x2103 #x2105 #x2109 #x210A #x210F #x2116
                  #x2121 #x2126 #x2127 #x212B #x2135 #x213B
                  #x221A #x221E #x2229 #x2248 #x2261 #x2264 #x2265
                  (#x2500 . #x25A0))))
  (set-frame-font base-font)
  (dolist (c l) (set-fontset-font t c alt-font)))

For example, C-U C-x = on #x00A7 shows in *Help* buffer:
            character: § (displayed as §) (codepoint 167, #o247, #xa7)
              display: by this font (glyph code)
    uniscribe:-outline-Noto Sans Mono CJK JP Regular-normal-normal-normal-sans-13-*-*-*-p-*-iso8859-1 (#x66)

And C-U C-x = on #x25A0 shows in *Help* buffer:
            character: ■ (displayed as ■) (codepoint 9632, #o22640, #x25a0)
              display: by this font (glyph code)
    uniscribe:-outline-Noto Sans Mono-normal-normal-normal-mono-13-*-*-*-p-*-ascii-0 (#x78E)

If 'face property with :family "Noto Sans Mono CJK JP Regular" attribute
is put on such characters, wide glyphs are displayed.



In GNU Emacs 26.3 (build 1, x86_64-w64-mingw32)
 of 2019-08-29 built on CIRROCUMULUS
Repository revision: 96dd0196c28bc36779584e47fffcca433c9309cd
Windowing system distributor 'Microsoft Corp.', version 10.0.18363
Recent messages:

Configured using:
 'configure --without-dbus --host=x86_64-w64-mingw32
 --without-compress-install 'CFLAGS=-O2 -static -g3''

Configured features:
XPM JPEG TIFF GIF PNG RSVG SOUND NOTIFY ACL GNUTLS LIBXML2 ZLIB
TOOLKIT_SCROLL_BARS THREADS LCMS2

Important settings:
  value of $LANG: JPN
  locale-coding-system: cp932

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny seq byte-opt gv
bytecomp byte-compile cconv cl-loaddefs cl-lib dired dired-loaddefs
format-spec rfc822 mml easymenu mml-sec password-cache epa derived epg
epg-config gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode
mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047
rfc2045 ietf-drums mm-util mail-prsvr mail-utils term/bobcat elec-pair
time-date mule-util japan-util tooltip eldoc electric uniquify
ediff-hook vc-hooks lisp-float-type mwheel dos-w32 ls-lisp disp-table
term/w32-win w32-win w32-vars term/common-win tool-bar dnd fontset image
regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode
lisp-mode prog-mode register page menu-bar rfn-eshadow isearch timer
select scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932
hebrew greek romanian slovak czech european ethiopic indian cyrillic
chinese composite charscript charprop case-table epa-hook jka-cmpr-hook
help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs
button faces cus-face macroexp files text-properties overlay sha1 md5
base64 format env code-pages mule custom widget hashtable-print-readable
backquote threads w32notify w32 lcms2 multi-tty make-network-process
emacs)

Memory information:
((conses 16 99488 8352)
 (symbols 48 20227 1)
 (miscs 40 37 118)
 (strings 32 29809 1439)
 (string-bytes 1 765970)
 (vectors 16 14546)
 (vector-slots 8 572451 11096)
 (floats 8 51 106)
 (intervals 56 228 0)
 (buffers 992 12))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#39339; Package emacs. (Wed, 29 Jan 2020 18:26:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: ynyaaa <at> gmail.com
Cc: 39339 <at> debbugs.gnu.org
Subject: Re: bug#39339: 26.3; set-fontset-font does not replace some glyphs
Date: Wed, 29 Jan 2020 20:25:21 +0200
> From: ynyaaa <at> gmail.com
> Date: Wed, 29 Jan 2020 12:55:31 +0900
> 
> I installed Noto fonts, and tried to set up fontset composed of
> "Noto Sans Mono" and "Noto Sans Mono CJK JP Regular".
> For some characters "Noto Sans Mono CJK JP Regular" has wide glyphs.
> 
> Evaluating the form below, only characters
>   #x00A7 #x00B1 #x00B6 #x00D7 #x00F7 #x02C7 #x02C9 #x02CA #x02CB #x02D9
> are displayed with wide glyphs,
> and other characters listed in the form are displayed with narrow glyphs.
> 
> (let ((base-font "Noto Sans Mono")
>       (alt-font "Noto Sans Mono CJK JP Regular")
>       (l '(#x00A7 #x00B1 #x00B6 #x00D7 #x00F7
>                   #x02C7 #x02C9 #x02CA #x02CB #x02D9
>                   #x2015 #x2016 #x2020 #x2021 #x2025 #x2027 #x2030
>                   #x2035 #x203B #x2042 #x2051
>                   #x2100 #x2103 #x2105 #x2109 #x210A #x210F #x2116
>                   #x2121 #x2126 #x2127 #x212B #x2135 #x213B
>                   #x221A #x221E #x2229 #x2248 #x2261 #x2264 #x2265
>                   (#x2500 . #x25A0))))
>   (set-frame-font base-font)
>   (dolist (c l) (set-fontset-font t c alt-font)))

This makes "Noto Sans Mono" the default face's font, so it will be
used for any character supported by the font.  If that's what you see,
then it's the intended behavior, AFAIK.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#39339; Package emacs. (Thu, 30 Jan 2020 06:08:02 GMT) Full text and rfc822 format available.

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

From: ynyaaa <at> gmail.com
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 39339 <at> debbugs.gnu.org
Subject: Re: bug#39339: 26.3; set-fontset-font does not replace some glyphs
Date: Thu, 30 Jan 2020 15:06:55 +0900
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: ynyaaa <at> gmail.com
>> Date: Wed, 29 Jan 2020 12:55:31 +0900
>> 
>> I installed Noto fonts, and tried to set up fontset composed of
>> "Noto Sans Mono" and "Noto Sans Mono CJK JP Regular".
>> For some characters "Noto Sans Mono CJK JP Regular" has wide glyphs.
>> 
>> Evaluating the form below, only characters
>>   #x00A7 #x00B1 #x00B6 #x00D7 #x00F7 #x02C7 #x02C9 #x02CA #x02CB #x02D9
>> are displayed with wide glyphs,
>> and other characters listed in the form are displayed with narrow glyphs.
>> 
>> (let ((base-font "Noto Sans Mono")
>>       (alt-font "Noto Sans Mono CJK JP Regular")
>>       (l '(#x00A7 #x00B1 #x00B6 #x00D7 #x00F7
>>                   #x02C7 #x02C9 #x02CA #x02CB #x02D9
>>                   #x2015 #x2016 #x2020 #x2021 #x2025 #x2027 #x2030
>>                   #x2035 #x203B #x2042 #x2051
>>                   #x2100 #x2103 #x2105 #x2109 #x210A #x210F #x2116
>>                   #x2121 #x2126 #x2127 #x212B #x2135 #x213B
>>                   #x221A #x221E #x2229 #x2248 #x2261 #x2264 #x2265
>>                   (#x2500 . #x25A0))))
>>   (set-frame-font base-font)
>>   (dolist (c l) (set-fontset-font t c alt-font)))
>
> This makes "Noto Sans Mono" the default face's font, so it will be
> used for any character supported by the font.  If that's what you see,
> then it's the intended behavior, AFAIK.

With '(setq use-default-font-for-symbols nil)', the glyphs are displayed
as I intended.

How can I find this variable?
And what characters are considered to be symbols and punctuation?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#39339; Package emacs. (Thu, 30 Jan 2020 14:47:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: ynyaaa <at> gmail.com
Cc: 39339 <at> debbugs.gnu.org
Subject: Re: bug#39339: 26.3; set-fontset-font does not replace some glyphs
Date: Thu, 30 Jan 2020 16:45:48 +0200
tags 39339 notabug
thanks

> From: ynyaaa <at> gmail.com
> Cc: 39339 <at> debbugs.gnu.org
> Date: Thu, 30 Jan 2020 15:06:55 +0900
> 
> >> (let ((base-font "Noto Sans Mono")
> >>       (alt-font "Noto Sans Mono CJK JP Regular")
> >>       (l '(#x00A7 #x00B1 #x00B6 #x00D7 #x00F7
> >>                   #x02C7 #x02C9 #x02CA #x02CB #x02D9
> >>                   #x2015 #x2016 #x2020 #x2021 #x2025 #x2027 #x2030
> >>                   #x2035 #x203B #x2042 #x2051
> >>                   #x2100 #x2103 #x2105 #x2109 #x210A #x210F #x2116
> >>                   #x2121 #x2126 #x2127 #x212B #x2135 #x213B
> >>                   #x221A #x221E #x2229 #x2248 #x2261 #x2264 #x2265
> >>                   (#x2500 . #x25A0))))
> >>   (set-frame-font base-font)
> >>   (dolist (c l) (set-fontset-font t c alt-font)))
> >
> > This makes "Noto Sans Mono" the default face's font, so it will be
> > used for any character supported by the font.  If that's what you see,
> > then it's the intended behavior, AFAIK.
> 
> With '(setq use-default-font-for-symbols nil)', the glyphs are displayed
> as I intended.

Good, then there's no bug here.

> How can I find this variable?

But you just did (with a bit of help from me).

If you are asking about its discoverability, then this variable is
supposed to be important in very infrequent situations, so it is not
very visible.  As evidence to that effect, please note that by default
Emacs does display these characters, which is not a small feat for
Emacs to achieve, given that most fonts on Windows are not free.

> And what characters are considered to be symbols and punctuation?

Any character CH for which

  (aref char-script-table CH) => symbol




Added tag(s) notabug. Request was from Eli Zaretskii <eliz <at> gnu.org> to control <at> debbugs.gnu.org. (Thu, 30 Jan 2020 14:47:03 GMT) Full text and rfc822 format available.

Reply sent to Stefan Kangas <stefan <at> marxist.se>:
You have taken responsibility. (Mon, 10 Feb 2020 15:36:02 GMT) Full text and rfc822 format available.

Notification sent to ynyaaa <at> gmail.com:
bug acknowledged by developer. (Mon, 10 Feb 2020 15:36:02 GMT) Full text and rfc822 format available.

Message #21 received at 39339-done <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefan <at> marxist.se>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 39339-done <at> debbugs.gnu.org, ynyaaa <at> gmail.com
Subject: Re: bug#39339: 26.3; set-fontset-font does not replace some glyphs
Date: Mon, 10 Feb 2020 16:35:43 +0100
Eli Zaretskii <eliz <at> gnu.org> writes:

> tags 39339 notabug
> thanks
>
>> From: ynyaaa <at> gmail.com
>> Cc: 39339 <at> debbugs.gnu.org
>> Date: Thu, 30 Jan 2020 15:06:55 +0900
>> 
>> >> (let ((base-font "Noto Sans Mono")
>> >>       (alt-font "Noto Sans Mono CJK JP Regular")
>> >>       (l '(#x00A7 #x00B1 #x00B6 #x00D7 #x00F7
>> >>                   #x02C7 #x02C9 #x02CA #x02CB #x02D9
>> >>                   #x2015 #x2016 #x2020 #x2021 #x2025 #x2027 #x2030
>> >>                   #x2035 #x203B #x2042 #x2051
>> >>                   #x2100 #x2103 #x2105 #x2109 #x210A #x210F #x2116
>> >>                   #x2121 #x2126 #x2127 #x212B #x2135 #x213B
>> >>                   #x221A #x221E #x2229 #x2248 #x2261 #x2264 #x2265
>> >>                   (#x2500 . #x25A0))))
>> >>   (set-frame-font base-font)
>> >>   (dolist (c l) (set-fontset-font t c alt-font)))
>> >
>> > This makes "Noto Sans Mono" the default face's font, so it will be
>> > used for any character supported by the font.  If that's what you see,
>> > then it's the intended behavior, AFAIK.
>> 
>> With '(setq use-default-font-for-symbols nil)', the glyphs are displayed
>> as I intended.
>
> Good, then there's no bug here.

I'm consequently also closing this bug report.

Best regards,
Stefan Kangas




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 10 Mar 2020 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 5 years and 105 days ago.

Previous Next


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