GNU bug report logs - #65803
29.1; Noto Sans Mono CJK JP has doubled-width on Windows

Previous Next

Package: emacs;

Reported by: Shingo Tanaka <shingo.fg8 <at> gmail.com>

Date: Thu, 7 Sep 2023 13:39:02 UTC

Severity: normal

Found in version 29.1

Full log


View this message in rfc822 format

From: Shingo Tanaka <shingo.fg8 <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 65803 <at> debbugs.gnu.org
Subject: bug#65803: 29.1; Noto Sans Mono CJK JP has doubled-width on Windows
Date: Fri, 8 Sep 2023 07:26:18 +0900
> Please also tell what does (frame-char-width) return with each of the
> two fonts on Windows.

Here are the results including the one on Ubuntu.
Obviously, the 2nd one (Noto on Windows) returns a doubled-width size
which is unexpected.

;; On Windows - No issue
(progn
  (set-face-attribute 'default nil :font "MS ゴシック")
  (frame-char-width))
10
(string-pixel-width "A")
10
(string-pixel-width "あ")
20

;; On Windows - Wrong frame-char-width
(progn
  (set-face-attribute 'default nil :font "Noto Sans Mono CJK JP")
  (frame-char-width))
20
(string-pixel-width "A")
10
(string-pixel-width "あ")
20

;; On Ubuntu (w/Cairo) - No issue
(progn
  (set-face-attribute 'default nil :font "Noto Sans Mono CJK JP")
  (frame-char-width))
13
(string-pixel-width "A")
13
(string-pixel-width "あ")
26

> Is your Ubuntu build with Cairo, btw?

Yes, the Emacs on Ubuntu is the latest Snap version which is compiled
with Cairo, as I can double check it by seeing colored Emoji.

2023年9月8日(金) 15:25 Eli Zaretskii <eliz <at> gnu.org>:
>
> > From: Shingo Tanaka <shingo.fg8 <at> gmail.com>
> > Date: Fri, 8 Sep 2023 08:19:29 +0900
> > Cc: 65803 <at> debbugs.gnu.org
> >
> > I'm not an expert on fonts either, but the reason why I reported is because
> > I don't see this issue on Ubuntu as attached with exactly the same font
> > (NotoSansMonoCJKjp-VF.ttf).  So the difference looks like coming from OS
> > difference but not emacs version difference.
>
> Could be: the way Emacs handles fonts on Windows is very different
> from what we do on GNU/Linux.  For example, it seemed to me that the
> session using this font on Windows actually used the bold variant of
> the font, which might have something to do with the very partial
> support for font families on MS-Windows.
>
> Please also tell what does (frame-char-width) return with each of the
> two fonts on Windows.
>
> Is your Ubuntu build with Cairo, btw?




This bug report was last modified 1 year and 280 days ago.

Previous Next


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