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: Sun, 10 Sep 2023 08:22:57 +0300

> From: Po Lu <luangruo@yahoo.com>
> Cc: shingo.fg8@gmail.com,  65803@debbugs.gnu.org
> Date: Sun, 10 Sep 2023 09:00:45 +0800
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > 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.
> 
> However, the only function of the average width property is to provide
> the average width of ASCII characters

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.

> Moreover, the average width attribute in
> older TrueType fonts is that of each ASCII glyph, and several fonts
> provide no average width attribute at all (given that an OS/2 table need
> not be supplied in fonts that aren't designed to function under
> MS-Windows), in which case calculating its value for each glyph at
> load-time will prove prohibitively expensive.

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?





reply via email to

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