emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: master 91418d27e9: Add new functions for computing character metrics


From: Stefan Monnier
Subject: Re: master 91418d27e9: Add new functions for computing character metrics for windows
Date: Sat, 30 Apr 2022 10:34:58 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

>> But admittedly, in most cases you can use
>> `window-max-characters-per-line only` as a heuristic because of the
>> effect of proportional fonts
> What else can you do when proportional fonts are used, except account
> fro the average width?

Indeed.  But it just means that (unless you do the kind of job that
Lars did in vtable and SHR) the code will always be somewhat broken, and
the difference between using `window-max-characters-per-line` or
`window-body-width` is in which cases it's broken.

>> and faces
> The function accepts FACE as the argument.  So this is accounted for.

I think you missed to "applied to specific parts of the text": the FACE
argument only handles the case where the whole line uses that same face.

> (And I wonder why this sudden crusade against this function.)

For one, because it's name makes it impossible to find when you're
looking for "one of those functions that returns some notion of text
width".
For two, because this was already a nasty mess and this function just
adds insult to injury, IMO.


        Stefan




reply via email to

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