From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kenichi Handa Newsgroups: gmane.emacs.devel Subject: Re: A bug in tetris Date: Tue, 21 Aug 2007 21:08:12 +0900 Message-ID: References: <7dbe73ed0708190822o5431b2b7m437a1d5073afe55@mail.gmail.com> <87hcmvp3bn.fsf@kfs-lx.testafd.dk> <87sl6dp9tg.fsf@kfs-lx.testafd.dk> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: text/plain; charset=US-ASCII X-Trace: sea.gmane.org 1187698131 28069 80.91.229.12 (21 Aug 2007 12:08:51 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 21 Aug 2007 12:08:51 +0000 (UTC) Cc: sdl.web@gmail.com, rms@gnu.org, emacs-devel@gnu.org To: storm@cua.dk (Kim F. Storm) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Aug 21 14:08:48 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1INSXP-00038r-Ez for ged-emacs-devel@m.gmane.org; Tue, 21 Aug 2007 14:08:47 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1INSXO-0004hg-QC for ged-emacs-devel@m.gmane.org; Tue, 21 Aug 2007 08:08:46 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1INSXL-0004hU-Ua for emacs-devel@gnu.org; Tue, 21 Aug 2007 08:08:43 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1INSXL-0004hH-63 for emacs-devel@gnu.org; Tue, 21 Aug 2007 08:08:43 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1INSXL-0004hE-3r for emacs-devel@gnu.org; Tue, 21 Aug 2007 08:08:43 -0400 Original-Received: from mx1.aist.go.jp ([150.29.246.133]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1INSXI-0005Ak-TZ; Tue, 21 Aug 2007 08:08:41 -0400 Original-Received: from rqsmtp1.aist.go.jp (rqsmtp1.aist.go.jp [150.29.254.115]) by mx1.aist.go.jp with ESMTP id l7LC8Ef8027513; Tue, 21 Aug 2007 21:08:14 +0900 (JST) env-from (handa@m17n.org) Original-Received: from smtp1.aist.go.jp by rqsmtp1.aist.go.jp with ESMTP id l7LC8DQO020241; Tue, 21 Aug 2007 21:08:13 +0900 (JST) env-from (handa@m17n.org) Original-Received: by smtp1.aist.go.jp with ESMTP id l7LC8CJa022740; Tue, 21 Aug 2007 21:08:12 +0900 (JST) env-from (handa@m17n.org) Original-Received: from handa by etlken.m17n.org with local (Exim 4.67) (envelope-from ) id 1INSWq-0003IU-BH; Tue, 21 Aug 2007 21:08:12 +0900 In-reply-to: <87sl6dp9tg.fsf@kfs-lx.testafd.dk> (storm@cua.dk) User-Agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/23.0.0 (i686-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) X-Detected-Kernel: Solaris 8 (1) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:76883 Archived-At: In article <87sl6dp9tg.fsf@kfs-lx.testafd.dk>, storm@cua.dk (Kim F. Storm) writes: > I answered (vaguely) yesterday, but I now recall the reasoning > for not making it standard: > In most cases, I would assume that if you put a face > (with a smaller line height) on the text on a whole line, > you also put that face on the newline if you want the whole > line to have the smaller line height. > If you leave the default face on the newline, you (probably) > want to have the default line spacing for the line even if the > text on the line is in a smaller face. > So this is the current default behaviour (as it was in 21.x) > -- which IMO is correct for normal use cases. > In the rare case where a line is in the default face, but only > contains (small height) images (e.g. in a game grid or a sliced image) > do you get into a case where the height of the newline may get into > the way -- that is why I made a special line-height=t property for the > newline to handle such unusual cases. > The insert-sliced-image function uses this property. > Game grid functions should do that too. > Conclusion: I think we should keep the current default. I don't have a strong objection to it. Anyway, I found that the current problem is in the different place. gamegrid.el has this function. (defun gamegrid-setup-default-font () (setq gamegrid-face (copy-face 'default (intern (concat "gamegrid-face-" (buffer-name))))) (when (eq gamegrid-display-mode 'glyph) (let ((max-height nil)) (loop for c from 0 to 255 do (let ((glyph (aref gamegrid-display-table c))) (when (and (listp glyph) (eq (car glyph) 'image)) (let ((height (cdr (image-size glyph)))) (if (or (null max-height) (< max-height height)) (setq max-height height)))))) (when (and max-height (< max-height 1)) (set-face-attribute gamegrid-face nil :height max-height))))) It tries to make a face height shorter than the grid-glyph height. I confirmed that when I change the last line to: (set-face-attribute gamegrid-face nil :height (- max-height 0.1)))))) the resulting face is good and doesn't produce 1-dot horizontal gap in the play field. I'm now investigating why the original code isn't good enough. --- Kenichi Handa handa@m17n.org