unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#39339: 26.3; set-fontset-font does not replace some glyphs
@ 2020-01-29  3:55 ynyaaa
  2020-01-29 18:25 ` Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: ynyaaa @ 2020-01-29  3:55 UTC (permalink / raw)
  To: 39339


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))





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#39339: 26.3; set-fontset-font does not replace some glyphs
  2020-01-29  3:55 bug#39339: 26.3; set-fontset-font does not replace some glyphs ynyaaa
@ 2020-01-29 18:25 ` Eli Zaretskii
  2020-01-30  6:06   ` ynyaaa
  0 siblings, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2020-01-29 18:25 UTC (permalink / raw)
  To: ynyaaa; +Cc: 39339

> From: ynyaaa@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.





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#39339: 26.3; set-fontset-font does not replace some glyphs
  2020-01-29 18:25 ` Eli Zaretskii
@ 2020-01-30  6:06   ` ynyaaa
  2020-01-30 14:45     ` Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: ynyaaa @ 2020-01-30  6:06 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 39339

Eli Zaretskii <eliz@gnu.org> writes:

>> From: ynyaaa@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?





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#39339: 26.3; set-fontset-font does not replace some glyphs
  2020-01-30  6:06   ` ynyaaa
@ 2020-01-30 14:45     ` Eli Zaretskii
  2020-02-10 15:35       ` Stefan Kangas
  0 siblings, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2020-01-30 14:45 UTC (permalink / raw)
  To: ynyaaa; +Cc: 39339

tags 39339 notabug
thanks

> From: ynyaaa@gmail.com
> Cc: 39339@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





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#39339: 26.3; set-fontset-font does not replace some glyphs
  2020-01-30 14:45     ` Eli Zaretskii
@ 2020-02-10 15:35       ` Stefan Kangas
  0 siblings, 0 replies; 5+ messages in thread
From: Stefan Kangas @ 2020-02-10 15:35 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 39339-done, ynyaaa

Eli Zaretskii <eliz@gnu.org> writes:

> tags 39339 notabug
> thanks
>
>> From: ynyaaa@gmail.com
>> Cc: 39339@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





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-02-10 15:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-29  3:55 bug#39339: 26.3; set-fontset-font does not replace some glyphs ynyaaa
2020-01-29 18:25 ` Eli Zaretskii
2020-01-30  6:06   ` ynyaaa
2020-01-30 14:45     ` Eli Zaretskii
2020-02-10 15:35       ` Stefan Kangas

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).