From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lars Magne Ingebrigtsen Newsgroups: gmane.emacs.devel Subject: Re: Accessing rendered image data Date: Tue, 28 Jun 2016 17:37:23 +0200 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1467128397 2071 80.91.229.3 (28 Jun 2016 15:39:57 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 28 Jun 2016 15:39:57 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jun 28 17:39:45 2016 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 1bHv6v-00052f-TN for ged-emacs-devel@m.gmane.org; Tue, 28 Jun 2016 17:39:38 +0200 Original-Received: from localhost ([::1]:37646 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHv6u-0000QR-Sw for ged-emacs-devel@m.gmane.org; Tue, 28 Jun 2016 11:39:36 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50266) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHv51-0007ry-Jd for emacs-devel@gnu.org; Tue, 28 Jun 2016 11:37:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bHv4x-0000qW-KH for emacs-devel@gnu.org; Tue, 28 Jun 2016 11:37:39 -0400 Original-Received: from hermes.netfonds.no ([80.91.224.195]:47342) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHv4x-0000nX-Ds for emacs-devel@gnu.org; Tue, 28 Jun 2016 11:37:35 -0400 Original-Received: from cm-84.215.1.64.getinternet.no ([84.215.1.64] helo=stories) by hermes.netfonds.no with esmtpsa (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.84_2) (envelope-from ) id 1bHv4l-00018W-RL for emacs-devel@gnu.org; Tue, 28 Jun 2016 17:37:27 +0200 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAGFBMVEWDgX3y7ua4tKza1coR ERH8/PfMx73n4tcwdbDVAAACaUlEQVQ4jW1SwW7bMAwVNKN3Ich09ehA5zYEpKvR6QcyoPeAGuRr XaHR7+/RSTc0nZDANh/J9x4p8/L5nJzrvl2qmDvAOe87c6nmS4HvieOXir3zrjeu/wGcAlLDfSsl Z+ZKdwAKWkJcyOw/dTppIwZ5Nae7RhDbECeD4v2/gpPzrDYkmNQc8ra/c6sHwMdAZE2sqax+t+5B jN+FQyglFjHda+BqGsfv2rGSVujXi7L8smb8AVGxVLQi0zVtvbGAwkfmIDQajtyeNuS7scavXY3o EAlkva991SEpB8SytgJQWaFNbneNUzsKiQkSeGkdPO9K0nu/XMmJJkmp+3eHXXSlSNgfhki1ckx9 VX5dUkog79hHkFpjU9G9a7ypKNFWsUbuuAHaxzWfLtCqzqVMzNpKfeoFaYuSm40jtbXvutupH12G qHMRXhIiK3p5pODulDcCEGotABjM7sm3hS9cYwkYiUhF47dFx+KT3xZejqTAxLEbhlS9OK2wxtU5 1VLjXMoFHRcuMKHs4BCJsc6tLZgHn6eCK0LYAB4BWXNMrSf/mvNs4XC0JmCT5WjmxgDakHO2IcC4 sRJElkNm6IysgLGTbNaDTOecH5bEdfmtgAlkRjPaWugRQEyRC17y8CzqHHIjjTkn6D2apzOaPaso MxKxhCFPcJZGoyT5m67WEkgOUBkAvObtTGhicKxF3qwphy0+Z6thsuPw92u4lmzpQmH7/MmEmV6B WQGyNAybFhIarq2uJSNds+hhvBXkeQQFZni+5i2P+YagGj7kIy2mjwoL54OtNylzqofbm7WjOczT h5RY6aNitH8AUZkYAL/UAc8AAAAASUVORK5CYII= In-Reply-To: (Lars Magne Ingebrigtsen's message of "Tue, 28 Jun 2016 15:52:40 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 80.91.224.195 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:204862 Archived-At: Lars Magne Ingebrigtsen writes: > If I have an image in a buffer, is there a way to access the displayed > image glyph data from Emacs Lisp? > > The glyph is presumably a ... block of bytes with a width/height > number... or something. The reason I'm asking is because I'm trying to asses the width of rendered text in an SVG image, but perhaps I can just render the text normally in Emacs. However, I can't make head or tails or the "advanced" face/font stuff in the manual. If I say emacs -nw "futura:size=40" I get all the text rendered in Futura. (find-font (font-spec :name "futura" :size 40)) # That's seems OK, doesn't it? But if I say (insert (propertize "FOO" 'face (list :font (find-font (font-spec :name "futura" :size 40))))) FOO and then say (font-at (point)) on that FOO, I get: # Same with (insert (propertize "FOO" 'face (list :font (find-font (font-spec :name "futura:size=40"))))) which is supposed to work, according to the manual. What am I missing? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no