Subject: Re: bug#65803: 29.1; Noto Sans Mono CJK JP has doubled-width on Windows

From: Eli Zaretskii <[email-masked]>
Date: Sun, 10 Sep 2023 08:42:02 +0300

> From: Po Lu <[email-masked]>
> Cc: [email-masked],  [email-masked]
> Date: Sun, 10 Sep 2023 13:36:01 +0800
> 
> Eli Zaretskii <[email-masked]> writes:
> 
> > AFAICT, we never use this for anything but FRAME_COLUMN_WIDTH.  So
> > when you talk about "average width of ASCII characters", I don't think
> > I understand what is that property, since we never call it like that
> > and never use it for ASCII characters.
> 
> That is the purpose of FRAME_COLUMN_WIDTH

No, the purpose of FRAME_COLUMN_WIDTH is much more than just "the
width of ASCII characters".  It is used as the canonical character
width of the frame, for gazillion purposes.  One example which
triggered this bug is :align-to display spec, something utterly
unrelated to ASCII characters.

> > I don't understand what you are trying to say here.  Who suggested to
> > calculate the value of the average width for each glyph in the font at
> > load time?
> 
> My point is, we don't need a new property; the W32 port should simply
> compute font->average_width using the widths of each ASCII glyph,
> disregarding tmAveCharWidth.

But other font back-ends don't compute average_width for fixed-pitch
fonts, so are you only talking about proportional fonts here?