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

From: Po Lu <[email-masked]>
Date: Sun, 10 Sep 2023 15:55:56 +0800

Eli Zaretskii <[email-masked]> writes:

>> From: Po Lu <[email-masked]>
>> Cc: [email-masked],  [email-masked]
>> Date: Sun, 10 Sep 2023 15:31:36 +0800
>> 
>> Eli Zaretskii <[email-masked]> writes:
>> 
>> > See above: other backends only calculate the average width for
>> > proportional fonts.  So what you say doesn't fit my reading of the
>> > code.
>> 
>> Because if spacing is not FC_PROPORTIONAL or FC_DUAL, we know in advance
>> that max_advance_width or max_advance are identical to the average of
>> all ASCII glyphs.  Such special treatment is an optimization, nothing
>> more.  max_advance_width is the advance width (in em space) of the
>> widest glyph when the font is scalable, and max_advance is that in pixel
>> space if not.
>
> So you think it's okay to do the same in the w32 font backend,
> i.e. take the average width from the font when the font is known to be
> fixed-pitch?  If not, please elaborate, because that's what I
> understand from what you wrote above.

I don't think it's okay, because the W32 font backend judges fonts that
are not fixed pitch to be so; Noto Sans Mono CJK JP, for example.