Function: shr-string-pixel-width

shr-string-pixel-width is a byte-compiled function defined in shr.el.gz.

Signature

(shr-string-pixel-width STRING)

Source Code

;; Defined in /usr/src/emacs/lisp/net/shr.el.gz
(defun shr-string-pixel-width (string)
  (if (not shr-use-fonts)
      (length string)
    ;; Save and restore point across with-temp-buffer, since
    ;; shr-pixel-column uses save-window-excursion, which can reset
    ;; point to 1.
    (let ((pt (point)))
      (prog1
	  (with-temp-buffer
	    (insert string)
	    (shr-pixel-column))
	(goto-char pt)))))