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: Lars Ingebrigtsen
Subject: Re: master 91418d27e9: Add new functions for computing character metrics for windows
Date: Fri, 29 Apr 2022 15:53:48 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Stefan Monnier <monnier@iro.umontreal.ca> writes:

> Any reason not to group them under the same heading?

I thought the "probably introduced" thing only looked in the headings?
And they were too long for one heading.

>> +    (let* ((face (if face face 'default))
>
> (or face 'default) ?

Yup; now done.

> Any chance we could have a `cl-defstruct` for those font-info objects, so
> we can use names rather than magic constants?  Alternatively a short
> comment here explaining the difference between 11 and 10 would be nice.

Sure, a defstruct would be nice.

>> +(defun window-max-characters-per-line (&optional window face)
>
> The name says "max", but AFAICT it's basically "window width / *average*
> char width", so it's not really the "max" number of chars (unsurprisingly).
>
> I'm not sure how best to name it (and document it), tho.
> For that I think I'd need to know what are the use cases (to see what
> property they rely on).

The use case basically is that you want to draw monospaced things that
aren't too wide, but the function was made a bit more general.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



reply via email to

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