From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: Several suggestions for image support Date: 23 Apr 2004 16:53:15 +0200 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: <200404230033.JAA10583@etlken.m17n.org> <200404231258.VAA12228@etlken.m17n.org> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1082734022 14322 80.91.224.253 (23 Apr 2004 15:27:02 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 23 Apr 2004 15:27:02 +0000 (UTC) Cc: storm@cua.dk, rms@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Fri Apr 23 17:26:52 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BH2Zo-0006ii-00 for ; Fri, 23 Apr 2004 17:26:52 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1BH2Zo-0000E3-00 for ; Fri, 23 Apr 2004 17:26:52 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1BH2KH-0002qq-Fs for emacs-devel@quimby.gnus.org; Fri, 23 Apr 2004 11:10:49 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1BH29m-00087I-M4 for emacs-devel@gnu.org; Fri, 23 Apr 2004 10:59:58 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1BH28G-0007Oi-0F for emacs-devel@gnu.org; Fri, 23 Apr 2004 10:58:55 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1BH23P-0005l4-FQ for emacs-devel@gnu.org; Fri, 23 Apr 2004 10:53:23 -0400 Original-Received: from fencepost.gnu.org ([127.0.0.1] helo=lola.goethe.zz) by fencepost.gnu.org with esmtp (Exim 4.24) id 1BH21n-0003ai-SF; Fri, 23 Apr 2004 10:51:44 -0400 Original-To: Kenichi Handa In-Reply-To: <200404231258.VAA12228@etlken.m17n.org> Original-Lines: 56 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:22067 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:22067 Kenichi Handa writes: > In article , David Kastrup > writes: > > > Kenichi Handa 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