[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#65803: 29.1; Noto Sans Mono CJK JP has doubled-width on Windows
From: |
Eli Zaretskii |
Subject: |
bug#65803: 29.1; Noto Sans Mono CJK JP has doubled-width on Windows |
Date: |
Sun, 10 Sep 2023 14:44:39 +0300 |
> From: Po Lu <luangruo@yahoo.com>
> Cc: 65803@debbugs.gnu.org, shingo.fg8@gmail.com
> Date: Sun, 10 Sep 2023 19:29:45 +0800
>
> Eli Zaretskii <eliz@gnu.org> writes:
>
> > 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.
>
> If I'm not mistaken, the font*_open functions take a single frame
> argument F, and the average width property doesn't need to be computed
> until then. Can't you obtain the DC from that frame?
That's what I tried. The problem is, first time we open the fonts
(which is when it's important to have the metrics of the default
face's font), we are called from x-create-frame for the initial frame,
and the frame's w32-specific attributes are not yet set. The
window-system for the frame is still "initial", and get_frame_dc
aborts.
- bug#65803: 29.1; Noto Sans Mono CJK JP has doubled-width on Windows, (continued)
- bug#65803: 29.1; Noto Sans Mono CJK JP has doubled-width on Windows, Po Lu, 2023/09/10
- bug#65803: 29.1; Noto Sans Mono CJK JP has doubled-width on Windows, Eli Zaretskii, 2023/09/10
- bug#65803: 29.1; Noto Sans Mono CJK JP has doubled-width on Windows, Po Lu, 2023/09/10
- bug#65803: 29.1; Noto Sans Mono CJK JP has doubled-width on Windows, Eli Zaretskii, 2023/09/10
- bug#65803: 29.1; Noto Sans Mono CJK JP has doubled-width on Windows, Po Lu, 2023/09/10
- bug#65803: 29.1; Noto Sans Mono CJK JP has doubled-width on Windows, Eli Zaretskii, 2023/09/10
- bug#65803: 29.1; Noto Sans Mono CJK JP has doubled-width on Windows, Po Lu, 2023/09/10
- bug#65803: 29.1; Noto Sans Mono CJK JP has doubled-width on Windows, Eli Zaretskii, 2023/09/10
- bug#65803: 29.1; Noto Sans Mono CJK JP has doubled-width on Windows, Eli Zaretskii, 2023/09/10
- bug#65803: 29.1; Noto Sans Mono CJK JP has doubled-width on Windows, Po Lu, 2023/09/10
- bug#65803: 29.1; Noto Sans Mono CJK JP has doubled-width on Windows,
Eli Zaretskii <=
- bug#65803: 29.1; Noto Sans Mono CJK JP has doubled-width on Windows, Po Lu, 2023/09/10
- bug#65803: 29.1; Noto Sans Mono CJK JP has doubled-width on Windows, Eli Zaretskii, 2023/09/10
- bug#65803: 29.1; Noto Sans Mono CJK JP has doubled-width on Windows, Shingo Tanaka, 2023/09/10