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: 25 Apr 2004 03:56:39 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

I have now reworked my line height changes.  

Now, the height of a newline equals the current face height, unless an
explicit line-spacing property is present on the newline character.

If the value of the line-spacing property is t, you get the effect of
my previous change, i.e. the newline character does not add to the
height of the row by itself, but the newline glyph is re-positioned 
inside the available row height to make it fully visible (when the
cursor is above it).

If the value is an integer, it overrides the value of the frame
line-spacing parameter and the (buffer local) value of the line-spacing
variable.

If the value is a float, the number of extra pixels is calculated
as the current row height * value.

I think this covers all the objections raised.

Try this:

(make-face 'small)
(set-face-attribute 'small nil :height 0.5)
(insert (propertize "abc\ndef\nghi" 'face 'small)
        (propertize "\n" 'line-spacing t)
        (propertize "jkl" 'face 'small)        
        "\n")


Kenichi Handa <address@hidden> writes:
 
> By the way, it seems that the current code doesn't draw a
> hollow cursor correctly.   The bottom line of the rectangle
> is not drawn (see the attached image).

That's an old bug which probably never got noticed because lines were
never less that the default face height.

I fixed that too.

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





reply via email to

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