From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard M Stallman Newsgroups: gmane.emacs.devel Subject: Re: width of propertized string Date: Fri, 06 Jun 2008 15:03:54 -0400 Message-ID: References: <20ecf6c70806050537k1d343af9r7a05240b5558ea10@mail.gmail.com> <8122960A-4AF5-439B-91CB-F2E51D4E88C5@gmail.com> Reply-To: rms@gnu.org NNTP-Posting-Host: lo.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: ger.gmane.org 1212779259 12662 80.91.229.12 (6 Jun 2008 19:07:39 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 6 Jun 2008 19:07:39 +0000 (UTC) Cc: david.reitter@gmail.com, nathaniel.cunningham@gmail.com, emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jun 06 21:08:21 2008 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 1K4hIF-0006dj-19 for ged-emacs-devel@m.gmane.org; Fri, 06 Jun 2008 21:08:07 +0200 Original-Received: from localhost ([127.0.0.1]:59638 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K4hHS-0004eK-9M for ged-emacs-devel@m.gmane.org; Fri, 06 Jun 2008 15:07:18 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1K4hG5-0003ys-2p for emacs-devel@gnu.org; Fri, 06 Jun 2008 15:05:53 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1K4hG2-0003x4-Sa for emacs-devel@gnu.org; Fri, 06 Jun 2008 15:05:52 -0400 Original-Received: from [199.232.76.173] (port=51196 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K4hG2-0003wf-Jp for emacs-devel@gnu.org; Fri, 06 Jun 2008 15:05:50 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]:43187) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1K4hG2-00015o-8g for emacs-devel@gnu.org; Fri, 06 Jun 2008 15:05:50 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1K4hEA-0003Nb-4W; Fri, 06 Jun 2008 15:03:54 -0400 In-reply-to: (message from Stefan Monnier on Thu, 05 Jun 2008 15:47:16 -0400) X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) 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:98529 Archived-At: > Given a propertized string, how would one find out what its (pixel) > dimensions are going to be? Display it, measure its size. That is not adequate when you want to choose other text based the size of this text. There needs to be a way to compute the size before displaying the text. The font to be used depends on the frame where it's displayed, so the size of the text needs to be considered in the context where it'll be displayed. Indeed, and this way could involve specifying the frame as well as a position in a buffer.