From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.devel Subject: Re: Determining size of a propertised string Date: Tue, 29 Nov 2016 15:16:17 +0100 Message-ID: <583D8DB1.6060102@gmx.at> References: <583D5FCA.2080302@gmx.at> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1480429017 25905 195.159.176.226 (29 Nov 2016 14:16:57 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 29 Nov 2016 14:16:57 +0000 (UTC) Cc: emacs-devel To: =?UTF-8?B?RWxpYXMgTcOlcnRlbnNvbg==?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Nov 29 15:16:46 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cBjD7-0004i3-BV for ged-emacs-devel@m.gmane.org; Tue, 29 Nov 2016 15:16:41 +0100 Original-Received: from localhost ([::1]:37312 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cBjDB-0001nS-1u for ged-emacs-devel@m.gmane.org; Tue, 29 Nov 2016 09:16:45 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44751) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cBjCz-0001ln-Sg for emacs-devel@gnu.org; Tue, 29 Nov 2016 09:16:34 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cBjCu-0007Ow-VL for emacs-devel@gnu.org; Tue, 29 Nov 2016 09:16:33 -0500 Original-Received: from mout.gmx.net ([212.227.17.20]:55303) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cBjCu-0007OB-ND for emacs-devel@gnu.org; Tue, 29 Nov 2016 09:16:28 -0500 Original-Received: from [192.168.1.100] ([212.95.7.94]) by mail.gmx.com (mrgmx102 [212.227.17.168]) with ESMTPSA (Nemesis) id 0M5IdH-1cv2KE3nbz-00zXVv; Tue, 29 Nov 2016 15:16:26 +0100 In-Reply-To: X-Provags-ID: V03:K0:Rt9byg2Wu1InYl3kzpVwz6AWS0irGNHFiucZzX4MJlx8ev5lW5o NZADgbpOi3ieK7A3Y80KEMXfpNpa/d6O7OWiNYIbI0Vyp6awKXmrAtA4+tNysBUwi1MQE1s VeGqD47IW6KdF5dKe+JYuUQQwKCDlUMwUVXGDn+M56HesM43Tv7Ey1QsDoLfryNjoRmhErd +BDGsIr+QUhZzEzIVQjrg== X-UI-Out-Filterresults: notjunk:1;V01:K0:egYk0TPG5+s=:9LyIQHKP7abtIxVsJvjOYc 4Mo715n/xKSR2wLYn8pCm3Cp/5ADvVmYYzPQAu4mvbncYEwpvDR/p0DFxIgVlQjKtdkYRqYb7 FsNQMnYfYJzRd20Dp4sNlmYNRMiALWRGsoD0d9q/BOqECCHdRDGVPdkQr5kKCAZwqCIe9dWqr pJ2GtSRuTsW51+NOsTbtCN1fgmy9/dNi8k86XwHSLiXw2lyNYb2Zk5vhhBELcWCc/udjmIV7r CNSnZib0qaTcLBAOA7cdFrDsj57CbIN8qX+yZxu1lbkFC+mnwwpaXgs8WrdxSKMeSEwX/KBBS vqHDDlTp4ldOYSRx4ShB4DeliXz1KnIF0oDSISG42jfYL70s8ZVEDTH98OSlwZDNQKEHnhWUB GfV3v2kO1b8LIC7FDbcoVVm5c/OSwi/ObG4Iiy2tsxySdbuWAqegGJqAXG7KZR58++S2A1aDp TEeGBtfCCs4f0E/1f1HausKro6CtGXJrE+jNsuQgFCqfy+N5Cw2SW1Y80xj4A+uRFLamlL8uJ P6g89aVovSeOH/Cg4zf9w9I1rAEzOG2/2VEM2ryv+xme6Z2Tq9ln0fW6NSGYal8WsxAF81798 Pgs3p04U6YbtcylFk17hBsWnYbPc3MRhlfT73b4lycSTlROzP+Z6pYif74kM/UHWEuAPkflWs wPUtmuG821ViRO1ZoGPkN6txTLxHVd3z24rGKW3227koFETZvm5Lja3EAbPxOyiscuyJYj3Sh CRriSWqy8fVP8rk4jnxMmVMIr2F56jWIys44IDahbMPvA3R4cxx50lYz0tlzaPswI3MJBuXx X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.227.17.20 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:209729 Archived-At: > So in the interest of satisfying my own curiosity, is there a way to > determine the height of a given string? "A given string" doesn't have a height per se. It's assigned a height only when you put it into a buffer and put that buffer in a window on a display. This may wrap the string and assigns the corresponding font, text, overlay and other properties to that string's constituents. You can use the function =E2=80=98window-text-pixel-size=E2=80=99 in order to= determine the size of the string it would occupy, in pixels, at a given buffer position on your display. That's what =E2=80=98fit-window-to-buffer=E2=80= =99 does. martin