emacs-devel
[Top][All Lists]
Advanced

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

Re: Several suggestions for image support


From: Kim F. Storm
Subject: Re: Several suggestions for image support
Date: 29 Apr 2004 02:17:47 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

Richard Stallman <address@hidden> writes:

>     Quite contrary, I always found it very odd (i.e. buggy) that emacs
>     forces all lines to be at least as high as the default frame line
>     height.  That means that you cannot have any "fine print".
>
> Paragraphs of "fine print" should have smaller line spacing.  However,
> when text in a smaller font appears in the middle of a paragraph that
> is mainly ordinary size, even if one whole line is in the smaller
> font, that line's spacing should not be reduced.

But 21.2 did that, so I have tried to be compatible.

>
> So the right way to handle this is not really based on the size
> of the text in the line.
>
> Another idea is to make it depend on the height of the newlines.

That is what it does already -- the height of the newline is derived
from the face font of the newline, not the text in the line.

But if the text in the line is taller than the ordinary line height,
the text height "wins".

>                                                                   That
> would mean putting the newlines into the ordinary font even though the
> text around them is in a smaller font.  That would work provided the
> fill commands know how to keep the newlines in the ordinary font.
>

We could accomplish this by setting the line-height property to the
pixel height of a specific face *) The effect of this would be that
newlines would have the height of that face, rather than the current
font.

Code could then set the line-height from that face's height on a whole
paragraph to make it immune to filling changing the spaces & newlines
in the paragraph.

Of course, this requires that code explicitly specifies the face to
use for line spacing, but since any existing code will assume the
21.2 behaviour, this approach is backwards compatible.


*) I don't see any way to actually obtain the pixel height of a face
from lisp.  What about adding a face-char-height function
(corresponding to frame-char-height).

Args would be FACE &optional FRAME.


--
Kim F. Storm <address@hidden> http://www.cua.dk





reply via email to

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