emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: HTML-Info design


From: Lars Ingebrigtsen
Subject: Re: HTML-Info design
Date: Mon, 26 Jan 2015 13:16:43 +1100
User-agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux)

Eli Zaretskii <address@hidden> 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/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]