[Top][All Lists]

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

Re: Several suggestions for image support

From: David Kastrup
Subject: Re: Several suggestions for image support
Date: 23 Apr 2004 01:02:50 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

address@hidden (Kim F. Storm) writes:

> Richard Stallman <address@hidden> writes:
> >     However, I have fixed the treatment of newline characters
> >     so that non-empty lines are no longer made a minimum
> >     height equal to the frame default line height.
> > 
> > That could have bad effects in many cases.  
> I honestly don't understand why this is a problem.

For instance, preview-latex uses images as a substitute for
characters.  If I have a line that looks like
I still want to have it keep the full line distance to the previous
line in order to avoid inconsistent spacing.

This is existing usage of images.  In contrast, sliced images have no
existing usage.  For this reason alone, it would be more useful to
put the burden of removing the interline space on applications
wanting seamless joining of images rather than on applications that
want the normal spacing to be kept: we already _have_ applications
that assume they need to do nothing special in order to keep the
normal line spacing.

> 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".

That's why I proposed to take the line spacing corresponding to the
face valid on the new-line character (we'd need something like a
null-face with zero metrics) or have something like a line-distance
property we could tack onto it.  Instead of the line spacing for the
newline, one could also take the largest line spacing prevalent in the
line _including_ the newline (as I explained above, there are
existing applications of image-only lines which need to have a
non-zero line spacing).  That way we would still be able to do
properly spaced fine-print.

> Of course, I can change this, but my feeling is that the new
> behaviour is more in line with what people would expect,

Existing preview-latex code expects to be spaced like text by
default.  Your change would make some future special-case code
slightly easier, at the cost of complicating existing uses.

I think we can do this with less negative impact on existing usage, at
just a small cost for future uses: just make it easy to specify
explicitly when you want zero line spacing.

> If you really have an application where you want to force the old
> behaviour (I doubt there are currently any such uses),

preview-latex uses glyphs as a replacement for characters.  And it
allows a line to consist just of images.  So there are such uses
right now.

> there are ways to force the line to be shown with the default line
> height (e.g. use a 'display space property with a zero width and a
> height of 1 -- ok, that is currently not supported, but it could
> easily be added).

I think it would be less contrived to force the line spacing to zero
by putting a suitable property on the newline.

David Kastrup, Kriemhildstr. 15, 44793 Bochum

reply via email to

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