From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.devel Subject: Re: HTML-Info design Date: Mon, 26 Jan 2015 13:16:43 +1100 Message-ID: <87iofui8vo.fsf@building.gnus.org> References: <87vbl2xigp.fsf@ferrier.me.uk> <83ioh2nlow.fsf@gnu.org> <87sig6xech.fsf@ferrier.me.uk> <83fvc5ni0u.fsf@gnu.org> <87k31fwwyv.fsf@ferrier.me.uk> <87bnmq9ibf.fsf@ferrier.me.uk> <87lhlrx5fc.fsf@building.gnus.org> <878uhrcr5l.fsf@building.gnus.org> <83sifzjflk.fsf@gnu.org> <87fvbyagaw.fsf@building.gnus.org> <83iogujvbq.fsf@gnu.org> <87tx0ee7rf.fsf@building.gnus.org> <83egricpvg.fsf@gnu.org> <87zj97vic8.fsf@building.gnus.org> <83wq4argjp.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1422238653 29369 80.91.229.3 (26 Jan 2015 02:17:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 26 Jan 2015 02:17:33 +0000 (UTC) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jan 26 03:17:32 2015 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 1YFZF4-0000Bd-W2 for ged-emacs-devel@m.gmane.org; Mon, 26 Jan 2015 03:17:31 +0100 Original-Received: from localhost ([::1]:39684 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YFZF3-0007Az-Pr for ged-emacs-devel@m.gmane.org; Sun, 25 Jan 2015 21:17:29 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34078) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YFZF0-0007Ar-Ak for emacs-devel@gnu.org; Sun, 25 Jan 2015 21:17:27 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YFZEs-0007pU-2s for emacs-devel@gnu.org; Sun, 25 Jan 2015 21:17:22 -0500 Original-Received: from hermes.netfonds.no ([80.91.224.195]:57481) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YFZEr-0007n0-SZ; Sun, 25 Jan 2015 21:17:18 -0500 Original-Received: from [27.96.197.126] (helo=building.gnus.org) by hermes.netfonds.no with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1YFZES-00079q-VL; Mon, 26 Jan 2015 03:16:53 +0100 In-Reply-To: <83wq4argjp.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 25 Jan 2015 18:06:18 +0200") User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux) X-MailScanner-ID: 1YFZES-00079q-VL MailScanner-NULL-Check: 1422843413.81064@YNjDKMGegYZhZXaN8X52vA X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.224.195 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:181768 Archived-At: Eli Zaretskii writes: > The function 'font-at' will give you the font object you can feed to > 'font-get-glyphs'. Thanks. I hacked up this function: (defun pixel-region-width (start end) (let ((width 0)) (while (< start end) (let ((glyphs (font-get-glyphs (font-at start) start start))) (setq width (+ width (aref (car glyphs) 4)))) (setq start (1+ start))) width)) But it fails because `font-get-glyphs' always returns nil when I try it. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog http://lars.ingebrigtsen.no/