From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Adrian Robert" Newsgroups: gmane.emacs.devel Subject: Re: font-backend mechanism on Windows and Mac? Date: Fri, 14 Sep 2007 19:10:35 -0400 Message-ID: <55f7df060709141610n2d632435o2d583a703954e2e4@mail.gmail.com> References: <46E4F571.3030101@gnu.org> <46E54A83.2070702@gnu.org> <46E54B7B.3070104@gnu.org> <46E93E1C.3030808@gnu.org> <46EA9371.7020701@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1189811455 779 80.91.229.12 (14 Sep 2007 23:10:55 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 14 Sep 2007 23:10:55 +0000 (UTC) Cc: emacs-devel@gnu.org, Kenichi Handa To: "Jason Rumney" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Sep 15 01:10: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 1IWKJB-00013u-Q0 for ged-emacs-devel@m.gmane.org; Sat, 15 Sep 2007 01:10:46 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IWKJA-0000KA-S5 for ged-emacs-devel@m.gmane.org; Fri, 14 Sep 2007 19:10:44 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IWKJ6-0000HJ-ML for emacs-devel@gnu.org; Fri, 14 Sep 2007 19:10:40 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IWKJ4-0000D0-Ss for emacs-devel@gnu.org; Fri, 14 Sep 2007 19:10:40 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IWKJ4-0000Cm-Kl for emacs-devel@gnu.org; Fri, 14 Sep 2007 19:10:38 -0400 Original-Received: from wa-out-1112.google.com ([209.85.146.183]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IWKJ4-0003VG-1k for emacs-devel@gnu.org; Fri, 14 Sep 2007 19:10:38 -0400 Original-Received: by wa-out-1112.google.com with SMTP id k34so1124051wah for ; Fri, 14 Sep 2007 16:10:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=cPQuGN7UvP3eBIpnWsu4ZZAysfxa9SI9hp1qRCgJPl0=; b=oGLqsxFLudFw7349AaMT2+WDr6e96h3a1jANKCoInHBA6GNR3lad6uY4P2ciWWcypkOVOePSDzxSh/aPenFbaFNLr9Pm6NUX2BoN9AhTCB7V0cXK/frY3s9lvFp/KsHzUtWC4+YpwChea0c/7zSQ36oQgkmt0xYuIhIomK5ojkw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=Zg9okdxfETnsiwsumq5xACqhZoWWXF5xeTEFZYkaE/g+pcPtFb41MLX5NopdLoLfS7twG/eAiVcyy0KrajWB5X1HZYhK8V40upA/5HzDbZhhbX5Sgm15yQnDDOD0SEpzw3Q0VGzSxPufUOvezjLKbJi/m6t9vvKPHV3h7ePhIPg= Original-Received: by 10.115.55.1 with SMTP id h1mr540874wak.1189811435188; Fri, 14 Sep 2007 16:10:35 -0700 (PDT) Original-Received: by 10.141.164.19 with HTTP; Fri, 14 Sep 2007 16:10:35 -0700 (PDT) In-Reply-To: <46EA9371.7020701@gnu.org> Content-Disposition: inline X-Detected-Kernel: Linux 2.6 (newer, 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:78921 Archived-At: On 9/14/07, Jason Rumney wrote: > Kenichi Handa wrote: > > Do you mean that the displaying got slower after the recent > > change? > > > > Perhaps, it does seem a little slower, and the more complex clipping > masks might have caused that, but I think most of the slowness is from > the new font-backend itself. It seems to be outputting a character at a > time, rather than whole lines. It might be due to a workaround in the > Windows code to avoid a Cleartype bug in the old font code (though I'd > expect the old code to be similarly slow in that case), or it might be > not combining multiple redraw requests as the overlapping window is > moved over the Emacs frame. Another possibility is the metrics implementation. In text_extents() the W32 and Xft impls query the font itself for the metrics every time. With Xft this may be fast if the font is client-side (and it does it for the whole string, not each char), but possibly under Windows it is not. In Cocoa nsfont.m metrics are cached in blocks of 256 chars to deal with this. It would be easy to adapt that to other terms, though then the code should perhaps go as a utility into font.c. (But drivers _should_ do a full-string determination like xftfont.c does if they can, so they wouldn't need it.) How is the performance under X without Xft?