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

From: Eli Zaretskii <[email-masked]>
Date: Sat, 09 Sep 2023 17:45:03 +0300

> From: Po Lu <[email-masked]>
> Cc: Werner LEMBERG <[email-masked]>,  [email-masked],  [email-masked]
> Date: Sat, 09 Sep 2023 21:42:14 +0800
> 
> Eli Zaretskii <[email-masked]> writes:
> 
> > How does one know, using the OpenType specification info, whether a
> > given font is fixed-pitch or proportional?  I seem to be unable to
> > find this in the spec, but maybe I need new glasses.
> 
> This information is not available within the font file, at least in the
> TrueType specification which is the basis for OpenType.  Programs which
> read TrueType fonts are obliged to judge for themselves, customarily by
> taking measurements of each font's glyphs, or by searching for ``Mono''
> within the font's family name.  I don't know which approach Windows
> employs.

MS-Windows seems to report it in the data it holds about the font.
See the lfPitchAndFimily attribute in the LOGFONT structure:

  https://learn.microsoft.com/en-us/windows/win32/api/wingdi/ns-wingdi-logfontw

and the tmPitchAndFamily attribute of the TEXTMETRIC structure:

  https://learn.microsoft.com/en-us/windows/win32/api/wingdi/ns-wingdi-textmetricw

I have no idea how these attributes are determined by Windows.