From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: A patch for enforcing double-width CJK character display Date: Thu, 12 Apr 2012 12:53:24 +0300 Message-ID: <83hawp46p7.fsf@gnu.org> References: <4F85A138.6090900@i-soft.com.cn> <87vcl646c7.fsf@isil.kanru.info> <4F85AE69.9050002@i-soft.com.cn> <4F8698B0.2030703@i-soft.com.cn> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE X-Trace: dough.gmane.org 1334224565 31825 80.91.229.3 (12 Apr 2012 09:56:05 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 12 Apr 2012 09:56:05 +0000 (UTC) Cc: kanru@kanru.info, emacs-devel@gnu.org To: =?utf-8?B?6buE5bu65b+g?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Apr 12 11:56:04 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SIGl1-0001I3-Bf for ged-emacs-devel@m.gmane.org; Thu, 12 Apr 2012 11:56:03 +0200 Original-Received: from localhost ([::1]:40333 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SIGl0-0002mJ-PZ for ged-emacs-devel@m.gmane.org; Thu, 12 Apr 2012 05:56:02 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:45484) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SIGku-0002lp-C9 for emacs-devel@gnu.org; Thu, 12 Apr 2012 05:56:00 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SIGkm-0003dq-NE for emacs-devel@gnu.org; Thu, 12 Apr 2012 05:55:55 -0400 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:51053) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SIGkl-0003de-Uk for emacs-devel@gnu.org; Thu, 12 Apr 2012 05:55:48 -0400 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0M2D00E0026MD700@a-mtaout22.012.net.il> for emacs-devel@gnu.org; Thu, 12 Apr 2012 12:55:27 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([84.229.57.204]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0M2D00CKG28DQLG2@a-mtaout22.012.net.il>; Thu, 12 Apr 2012 12:55:26 +0300 (IDT) In-reply-to: <4F8698B0.2030703@i-soft.com.cn> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-Received-From: 80.179.55.172 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:149608 Archived-At: > Date: Thu, 12 Apr 2012 16:56:16 +0800 > From: =E9=BB=84=E5=BB=BA=E5=BF=A0 > Cc: emacs-devel@gnu.org >=20 > FRAME_COLUMN_WIDTH and FRAME_SPACE_WIDTH never changed, it only be= =20 > initialized when first font loaded. Right, and that's by design. > Can anybody provide a clue how to catch the new width of default fo= nt=20 > via FRAME_PTR when scale happened? I don't think there is a way to do that, if all you have is the frame pointer. text-scale-mode does not modify the frame's default font, i= t remaps the 'default' face to another face which specifies a larger or a smaller font. So the way to find the width of the font after scaling is to get hold of the font itself, or of the face to which 'default' was remapped. Then you can use FONT_WIDTH, I think (but I didn't test this).