bug-gnu-emacs
[Top][All Lists]
Advanced

[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: Sat, 09 Sep 2023 17:39:56 +0300

> From: Po Lu <luangruo@yahoo.com>
> Cc: shingo.fg8@gmail.com,  65803@debbugs.gnu.org
> Date: Sat, 09 Sep 2023 21:38:32 +0800
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > Thanks, but the above snippet in ftfont.c is only done for
> > proportional fonts, not for fixed-pitch fonts.  Is the font in
> > question, Noto Sans Mono CJK JP, a proportional font?  That is, does
> > it not set the fixed-pitch attribute?
> 
> There's no spacing attribute in TrueType fonts, so that is contingent
> upon how the MS Windows font scaler detects fixed pitch fonts.  Here's
> how ftfont.c calculates the average width for fonts that Fontconfig
> deems fixed pitch:
> 
>     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);

What is metrics.max_advance, in terms of the attributes recorded in
the font file?

> That aside, Fontconfig does not judge Noto Sans Mono CJK JP a fixed
> pitch font on my system.

OK, that might explain part of the issue, thanks.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]