[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Is this a bug? (was: line-height and line-spacing - behavior and doc
Kim F. Storm
Re: Is this a bug? (was: line-height and line-spacing - behavior and doc)
Tue, 30 May 2006 09:50:53 +0200
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)
Richard Stallman <address@hidden> writes:
> Drew says that specifying t gets rid of spacing between image slices,
> but doesn't get rid of spacing between lines of text. Is that a bug?
It is debateable...
Normally, the line height is the height of the tallest "character cell"
in the row. So if you use a small font, lines will be narrower than
the normal frame font line height.
However, in most fonts, the "character cell" include some extra pixels
at the top and bottom, so visually, there seems to be a non-zero
line spacing between lines, but it is not added by emacs itself; it
is part of the font metrics. I don't know if there is some way to
get to that information (in general)--if there is, we could try to
take that into account, but now is not the time to think about it.
The issue about the "line-height" property on newline and tiled images is
simply a way to tell the redisplay engine that is shall NOT include the
height of the newline character in the calculation of the line height.
Normally, a newline has the same height as a space character in the font.
That's how is has to be -- otherwise, empty lines would have zero height
(and there would be other issues as well).
So it is true that line-height can only INCREASE the height of a line,
except when it is placed on the final newline, in which case it can
indicate not to include the height of the newline in the line height.
> (Aside from that, this is just a documentation issue.)
> From: "Drew Adams" <address@hidden>
> Subject: line-height and line-spacing - behavior and doc
> To: "Emacs-Pretest-Bug" <address@hidden>
> Date: Sat, 20 May 2006 18:22:51 -0700
> Unless there is a product bug here, Elisp manual Info node Line Height
> should be clarified. Apparently, although it is said nowhere,
> line-height can never be less than the initial character height plus
> some irreducible interline spacing. I tried several values for
> line-height: t, (t . ratio), and (nil . ratio). Only when ratio was
> greater than 1.0 did I see any change in the appearance. More
> precisely, a ratio < 1.0 can be used if you previously used a ratio >
> 1.0 to insert more space, to bring it back to the default conditon,
> but you cannot reduce the default interline spacing, AFAICT. That
> seems hard-coded, AFAICT.
> I also did not notice that a value of t aligned characters with no
> space between them vertically, as I expected from the description
> ("tiling small images"). Apparently what it does for images you
> cannot do with lines of characters. Too bad.
> If this is only a doc bug (please clarify the doc), then the rest of
> this bug report is in fact a feature-enhancement request. I don't
> know what the design is, so I don't know if the doc is wrong
> (incomplete) or the product broken.
> I'd like to think that this is a bug that will be fixed, so you can
> use, for example, character graphics - or just make a (square) color
> palette with space characters or square-box characters. I would like
> to be able to get rid of all interline spacing, and maybe even overlap
> consecutive lines to some extent. That is, I'd like to be able to use
> a ratio < 1.0 starting from the default situation.
> The line-spacing frame parameter is described more clearly than is
> line-height - it hints at least that you cannot get rid of the space
> between lines; you can only add additional space.
> It would also be good to remove that limitation - to be able to reduce
> vertical line space using the line-spacing parameter, in particular,
> to remove the (hard-coded?) minimal interline space that seems always
> to be present.
> Another enhancement, slightly related, would be to be able to scale
> displayed characters (for display only), to change their height or
> width. I guess you might be able to do something by fiddling with a
> font spec, but it would be handy to change simply the displayed aspect
> ratio, for instance, not the font spec. You could use that to, for
> example, display a space character as a square instead of a rectangle
> with a hard-coded aspect ratio.
> I didn't find much use of line-height in the standard Emacs-Lisp
> libraries, so I wonder if all of the various values actually got
> tested. I'm hoping that they didn't, and that this is a product bug
> that can be fixed, and not just a limitation in the design.
> In GNU Emacs 126.96.36.199 (i386-mingw-nt5.1.2600)
> of 2006-03-20 on W2ONE
> X server distributor `Microsoft Corp.', version 5.1.2600
> configured using `configure --with-gcc (3.4) --cflags -Id:/g/include'
> Important settings:
> value of $LC_ALL: nil
> value of $LC_COLLATE: nil
> value of $LC_CTYPE: nil
> value of $LC_MESSAGES: nil
> value of $LC_MONETARY: nil
> value of $LC_NUMERIC: nil
> value of $LC_TIME: nil
> value of $LANG: ENU
> locale-coding-system: cp1252
> default-enable-multibyte-characters: t
> Major mode: Emacs-Lisp
> Minor modes in effect:
> encoded-kbd-mode: t
> tooltip-mode: t
> auto-compression-mode: t
> tool-bar-mode: t
> mouse-wheel-mode: t
> menu-bar-mode: t
> file-name-shadow-mode: t
> global-font-lock-mode: t
> font-lock-mode: t
> blink-cursor-mode: t
> unify-8859-on-encoding-mode: t
> utf-translate-cjk-mode: t
> line-number-mode: t
> Recent input:
> e i g h t SPC t ) <return> C-_ C-x <escape> <escape>
> M-b M-b M-d ' ( t SPC . SPC 1 . <backspace> <backspace>
> 2 . 0 ) C-e <backspace> ) <return> C-x <escape> <escape>
> M-b M-b M-b M-d M-d 0 . 5 <return> C-x <escape> <escape>
> <return> C-x <escape> <escape> M-b M-b M-b M-b M-d
> n i l M-f M-f <M-backspace> <M-backspace> 2 . 0 <return>
> C-x <escape> <escape> M-b M-b M-b M-b M-f M-f M-f <M-backspace>
> <M-backspace> 0 . 5 <return> C-x <escape> <escape>
> <return> <help-echo> <help-echo> <help-echo> <help-echo>
> <help-echo> <help-echo> <help-echo> <help-echo> <menu-bar>
> <help-menu> <report-emacs-bug>
> Recent messages:
> Loading debug...done
> Entering debugger...
> Back to top level.
> Quit [3 times]
> repeat-complex-command: Command attempted to use minibuffer while in
> Quit [4 times]
> nil [6 times]
> Loading emacsbug...done
> emacs-pretest-bug mailing list
Kim F. Storm <address@hidden> http://www.cua.dk
- Re: Is this a bug? (was: line-height and line-spacing - behavior and doc),
Kim F. Storm <=