GNU bug report logs -
#65803
29.1; Noto Sans Mono CJK JP has doubled-width on Windows
Previous Next
Full log
View this message in rfc822 format
> From: Po Lu <luangruo <at> yahoo.com>
> Cc: shingo.fg8 <at> gmail.com, 65803 <at> debbugs.gnu.org
> Date: Sat, 09 Sep 2023 21:38:32 +0800
>
> font->min_width = font->average_width = font->space_width
> = (scalable ? ft_face->max_advance_width * size / upEM + 0.5
> : ft_face->size->metrics.max_advance >> 6);
>
> That aside, Fontconfig does not judge Noto Sans Mono CJK JP a fixed
> pitch font on my system.
Basically, calculating our own estimate of the average width means we
discard the attribute reported by the font, in effect backing up on
the change made in OpenType spec v3, which deprecated the previous
requirement to compute the average width based only on ASCII
characters. This seems to be justified only because Emacs uses the
average width of the font for one purpose only: to calculate the
default column width of a frame. So this calculation is only relevant
for when a font is used as the default face's font. If we ever decide
to use the average width for anything else, we might be bitten by
this.
So I think a cleaner solution would be to leave the average width
attribute as the font reports it, and introduce a new attribute for
the average width of the ASCII characters. Not sure how urgent this
is, but we should at least describe this subtlety in the comments.
This bug report was last modified 1 year and 281 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.