From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: jasonr@f2s.com Newsgroups: gmane.emacs.devel Subject: Re: Emacs defeats ClearType Date: Mon, 6 Jun 2005 16:47:16 +0100 Message-ID: <1118072836.42a47004de422@webmail.freedom2surf.net> References: <1117787455.42a0153fdf46f@webmail.freedom2surf.net> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1118073142 17006 80.91.229.2 (6 Jun 2005 15:52:22 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 6 Jun 2005 15:52:22 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jun 06 17:52:15 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DfJqY-0004Ij-Jn for ged-emacs-devel@m.gmane.org; Mon, 06 Jun 2005 17:49:02 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DfJwt-0000qB-9b for ged-emacs-devel@m.gmane.org; Mon, 06 Jun 2005 11:55:35 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DfJvu-0000Us-3J for emacs-devel@gnu.org; Mon, 06 Jun 2005 11:54:35 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DfJvn-0000QM-VF for emacs-devel@gnu.org; Mon, 06 Jun 2005 11:54:28 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DfJvn-0000OW-OK for emacs-devel@gnu.org; Mon, 06 Jun 2005 11:54:27 -0400 Original-Received: from [194.106.33.239] (helo=mail5.freedom2surf.net) by monty-python.gnu.org with esmtp (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.34) id 1DfJsJ-0002OI-PE for emacs-devel@gnu.org; Mon, 06 Jun 2005 11:50:52 -0400 Original-Received: from i-194-106-33-239.freedom2surf.net (i-194-106-33-239 [127.0.0.1]) by mail5.freedom2surf.net (8.12.11/8.12.11) with ESMTP id j56FlGZc017338; Mon, 6 Jun 2005 16:47:16 +0100 Original-Received: (from apache@localhost) by i-194-106-33-239.freedom2surf.net (8.12.11/8.12.11/Submit) id j56FlGNi017337; Mon, 6 Jun 2005 16:47:16 +0100 X-Authentication-Warning: i-194-106-33-239.freedom2surf.net: apache set sender to jasonr@f2s.com using -f Original-Received: from 217.205.90.2 ([217.205.90.2]) by webmail.freedom2surf.net (IMP) with HTTP for ; Mon, 6 Jun 2005 16:47:16 +0100 Original-To: David Abrahams In-Reply-To: User-Agent: Internet Messaging Program (IMP) 3.2.3 X-Originating-IP: 217.205.90.2 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:38188 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:38188 Quoting David Abrahams : > Incidentally, it seemed to work just fine for me if I remove the > checks for whether cleartype is enabled altogether, and just make the > width adjustments unconditionally. That is not a good idea. Your patch potentially affects performance, since it tells lies about the width of characters to counteract the system's lies, and may make them appear to be wider than their bounding box when they are not. If a character being redisplayed is detected to be wider than its bounding box, then the next character needs to be redrawn also, possibly cascading out to the full line in the worst cases. So we should only tell these lies when we know the system could be lying. What would be better is to do the test for Cleartype once per font and cache the result. Actually, you use a system setting for the test, so if there is not a way to find out if Cleartype is used for a specific font (I think there is), then a single test at startup is all that will be needed.