[Top][All Lists]

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

Re: set-frame-size should respect line-spacing!?

From: Ingo Lohmar
Subject: Re: set-frame-size should respect line-spacing!?
Date: Sat, 12 Oct 2019 11:56:03 +0200

On Sat, Oct 12 2019 12:45 (+0300), Eli Zaretskii wrote:

> I think we should first decide whether we want to invest such an
> effort to support a rare use case, which is also not without its
> pitfalls (as you describe above).
> A buffer can specify, in addition to line-spacing, other display
> features that will affect the metrics of its lines.  The simplest
> example is the face of the text to display, which can include the
> font.  It could even do this extremely subtly, by displaying text that
> belongs to a script whose font is higher or lower than the default
> face's font.  In all of these cases, the original number of text lines
> will be inaccurate for some buffers shown in the same window on the
> same frame.
> So I don't think I understand why we need to support these specialized
> use cases.

Just to be clear: While I do think that the relevant code at the C and
the Lisp level is not the easiest to follow, becuase a lot of different
concepts are implicitly involved (sorry Martin, for not remembering your
point about the line-spacing per buffer), I did not intend to start a
fundamental discussion on these issues.

My approach to this whole area was from the point of view of a user of
the posframe pkg (not even directly, but via company-posframe).  As
such, the question was "how to create a frame that fits N lines", and of
course, that is ill-defined (line-spacing, font choice subtleties, and
several more factors, I guess).

For the matter at hand, the fixed `fit-frame-to-buffer` does what I need
(or rather, what the posframe pkg needs); the rest is bug-fixing in the

reply via email to

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