unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: luangruo@yahoo.com
Cc: 65803@debbugs.gnu.org, shingo.fg8@gmail.com
Subject: bug#65803: 29.1; Noto Sans Mono CJK JP has doubled-width on Windows
Date: Sun, 10 Sep 2023 12:30:02 +0300	[thread overview]
Message-ID: <83fs3ms7dx.fsf@gnu.org> (raw)
In-Reply-To: <83h6o2s97x.fsf@gnu.org> (message from Eli Zaretskii on Sun, 10 Sep 2023 11:50:26 +0300)

> Cc: 65803@debbugs.gnu.org, shingo.fg8@gmail.com
> Date: Sun, 10 Sep 2023 11:50:26 +0300
> From: Eli Zaretskii <eliz@gnu.org>
> 
> > From: Po Lu <luangruo@yahoo.com>
> > Cc: shingo.fg8@gmail.com,  65803@debbugs.gnu.org
> > Date: Sun, 10 Sep 2023 16:31:57 +0800
> > 
> > Eli Zaretskii <eliz@gnu.org> writes:
> > 
> > > I don't see the fact of the font being fixed-pitch or proportional
> > > mentioned in the output of describe-font.  Am I missing something?
> > 
> > Strange.  Here, I see:
> > 
> > full name: Source Code Pro:pixelsize=13:foundry=ADBO:weight=regular:slant=normal:width=normal:spacing=100:scalable=true
> > 
> > where `spacing=100' indicates the font is monospace.
> 
> That's specific to Fontconfig, I think.  On Windows I see:
> 
>        full name: Courier New-10.0

Anyway, I tried to write the code to compute the font average width,
and found that it's impossible to do reliably on MS-Windows: all the
font-related functions that return glyph metrics require a "device
context" argument, which cannot be provided as long as we don't have
at least one w32 frame.  So invocations like

  emacs -fn "Arial Unicode MS"

will not work, and that means invoking Emacs with variable-pitch fonts
as the default will not be able to take advantage of this improvement,
which basically makes all this change useless.

Maybe it's possible to pull this trick anyway, but it will take
someone who knows the Windows GUI programming better than myself,
perhaps by reading the font data directly (like the Windows port of
Freetype does?).

Sorry.  I guess the conclusion is, unfortunately, that fonts like Noto
Sans Mono CJK JP cannot be used on Windows as the default font, only
as font for the CJK scripts (configured via the fontset).





  reply	other threads:[~2023-09-10  9:30 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-07 13:38 bug#65803: 29.1; Noto Sans Mono CJK JP has doubled-width on Windows Shingo Tanaka
2023-09-07 13:50 ` Eli Zaretskii
2023-09-07 14:24   ` Shingo Tanaka
2023-09-07 14:40     ` Eli Zaretskii
2023-09-07 14:57       ` Eli Zaretskii
2023-09-07 23:19         ` Shingo Tanaka
2023-09-08  6:25           ` Eli Zaretskii
2023-09-07 22:26             ` Shingo Tanaka
2023-09-08 12:18               ` Eli Zaretskii
2023-09-08 13:42                 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-08 14:49                   ` Werner LEMBERG
2023-09-09 12:51                     ` Eli Zaretskii
2023-09-09 13:42                       ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-09 14:45                         ` Eli Zaretskii
2023-09-09 12:17                   ` Eli Zaretskii
2023-09-09 13:38                     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-09 14:39                       ` Eli Zaretskii
2023-09-09 14:57                       ` Eli Zaretskii
2023-09-10  1:00                         ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-10  5:22                           ` Eli Zaretskii
2023-09-10  5:36                             ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-10  5:42                               ` Eli Zaretskii
2023-09-10  5:55                                 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-10  6:48                                   ` Eli Zaretskii
2023-09-10  7:31                                     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-10  7:53                                       ` Eli Zaretskii
2023-09-10  7:55                                         ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-10  8:01                                           ` Eli Zaretskii
2023-09-10  8:08                                             ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-10  8:19                                               ` Eli Zaretskii
2023-09-10  8:31                                                 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-10  8:50                                                   ` Eli Zaretskii
2023-09-10  9:30                                                     ` Eli Zaretskii [this message]
2023-09-10 11:29                                                       ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-10 11:44                                                         ` Eli Zaretskii
2023-09-10 12:09                                                           ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-10 12:43                                                             ` Eli Zaretskii
2023-09-10 12:39                                               ` Shingo Tanaka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83fs3ms7dx.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=65803@debbugs.gnu.org \
    --cc=luangruo@yahoo.com \
    --cc=shingo.fg8@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).