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: Sun, 25 Jan 2015 11:01:43 +1100 Message-ID: <87zj97vic8.fsf@building.gnus.org> References: <83ppbanqhe.fsf@gnu.org> <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> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1422144148 2788 80.91.229.3 (25 Jan 2015 00:02:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 25 Jan 2015 00:02:28 +0000 (UTC) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jan 25 01:02:24 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 1YFAek-0000Y7-JF for ged-emacs-devel@m.gmane.org; Sun, 25 Jan 2015 01:02:22 +0100 Original-Received: from localhost ([::1]:36450 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YFAej-0007FS-W1 for ged-emacs-devel@m.gmane.org; Sat, 24 Jan 2015 19:02:21 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50227) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YFAeg-0007FL-QJ for emacs-devel@gnu.org; Sat, 24 Jan 2015 19:02:19 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YFAed-00067I-KT for emacs-devel@gnu.org; Sat, 24 Jan 2015 19:02:18 -0500 Original-Received: from hermes.netfonds.no ([80.91.224.195]:43052) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YFAed-000678-ED; Sat, 24 Jan 2015 19:02:15 -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 1YFAeJ-00082s-05; Sun, 25 Jan 2015 01:01:55 +0100 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAMFBMVEVHicja5eT///7///9M jspNjbx0epFilcZimMyrq7YLDQ5BdrExPFpDh8dWlMlWltBDJEBgAAABWElEQVQ4jcXUL27DMBQG cIPSgSQo0C4azS4wENyRBVWKNGKpUunU3aBBm5JIld4FBnKFaheYCnqBsWGPFi17z//mJC0a2Kcq qb+fHYNYYTcXwv4bhBtk+uegjgF4nDb8OuKpSGshLOxWACBXIOVOSsBLYyESQkQi5hEXHP8KPrcg ARpck0I93DyLAHAX4OnDCIRLLILMWbYZ5MneE5btKW8fo7QaJrWFScsMBIXPFcKwnM3yPL9lzMGR yvw3LNFwHLYUDcdJbQAfbEe9Sf6pwU2/632UUgQ0fxHUff+tgXr11U9h2lu4zxdK+e5UVS+0iQZl AUsbA7iAnlUFeSYolYZTCNuNA1UNe4JiAlvzaotyBO6dF3oJHgM/24OVMI8GyhAUFsWy1aAXmXux 1Mdp39pzFeZA8XAI8t51HYIfd2EQurP5M7zKtZQriRnDei0PhARwNsnFL8MPu3QqLeJkL3kAAAAA SUVORK5CYII= X-Now-Playing: burn's _304 (Moon Base Big)_: "Wire!Red_Barked_Tree!01-Please_Take" In-Reply-To: <83egricpvg.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 29 Dec 2014 19:44:35 +0200") User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux) X-MailScanner-ID: 1YFAeJ-00082s-05 MailScanner-NULL-Check: 1422748917.02935@G/mitUZRAcDGWrZLv4Pm7Q 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:181737 Archived-At: Eli Zaretskii writes: >> I've just looked at the doc string of that function briefly, and I'm not >> sure how I would use that to do filling. I need to know the width a >> text will take in the buffer, so that I know when to break the line and >> start a new one. Is it now possible to write a function like >> `pixel-region-width' that would say how much space the text will occupy? > > Either make a string of the text you want to display, or insert that > text in a temporary buffer, then use this function to find the width > of that text by summing the widths of all the glyphs. I haven't played much with fonts before, so I'm afraid I don't know how to do this. I've played around with buffer-setting font code for half an hour, and I'm still not able to get to a font object from text in a buffer. So, starting with (say) (with-temp-buffer (buffer-face-set '(:family "Symbola" :height 150 :width semi-condensed)) (insert "This is a text")) how do I get the font object for each character there so that I can feed it to `font-get-glyphs'? `buffer-face-set' is probably the wrong thing here, though, since we would have many fonts in a buffer, but it's a start, perhaps... -- (domestic pets only, the antidote for overdose, milk.) bloggy blog http://lars.ingebrigtsen.no/