[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 16:53:15 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

Kenichi Handa <address@hidden> writes:

> In article <address@hidden>, David Kastrup
> <address@hidden> writes:
> > Kenichi Handa <address@hidden> writes:
> >>  I think the height of the space glyph for the tailing
> >>  newline should be the default frame line height in the above
> >>  case, and the line height must be desided by all glyphs
> >>  including the tailing space.
> > You are confusing line spacing and line height, I think.  Line
> > spacing is the distance by which the _baselines_ of different
> > lines are to be set apart unless this could cause overlap.
> I don't think I'm confusing.  In my paragraph above, I really meant
> line height.  But I should have written more clearly that "line
> height must be the maxinum logical font height (ascent + descent) of
> faces of all characters (including the tailing newline)".

Ok, what I mean by "line spacing" is not what the variables in Emacs
call by that name, but the prescribed distance between baselines for
a font.  Actually, I wrote that definition down two paragraphs above.

> Here I think we should not consider the physical ascent/descent of
> each glyph which may be taller or shorter than the the logical
> ascent/descent of a font.

I don't know how X11 defines the line spacings.  In typesetting,
however, each font comes with an associated baseline distance.  It may
be what you call the sum of logical ascent/descent, I don't know.  It
is the distance that the baselines should be apart for the font to
look good.  This is usually quite more than the sum of the maximum
ascent and descent available in the font, since good discrimination of
the lines requires a streak of empty space between the lines.

So let us assume that these logical ascent/descent of fonts are what
constitute the "line spacing" as I called it.  Then the recipe would
be to use
max(logical descent of newline character at end of above line +
  logical ascent of newline character at end of below line, max(all
  physical decents of characters in above line,0)+max(all physical
  ascents of characters in below line,0))

Images will not have a logical ascent/descent differing from their
physical one.  The idea is to keep the grid spacing prescribed by the
font of the line endings, unless this could cause overlap (can happen
if we have a few larger characters, or images in between).  Only when
overlap may occur, is the basic distance between lines prescribed by
the font of the newlines increased, and only by that amount which
makes it possible to rule out overlap.  In that way, the basic grid
only gets disrupted where it is unavoidable or where we have font size
changes lasting across line endings.

David Kastrup, Kriemhildstr. 15, 44793 Bochum

reply via email to

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