w2))))
(defun font-spatial-to-canonical (spec &optional device)
- "Convert SPEC (in inches, millimeters, points, or picas) into points"
+ "Convert SPEC (in inches, millimeters, points, or picas) into points."
;; 1 in = 6 pa = 25.4 mm = 72 pt
(cond
((numberp spec)
;;;###autoload
(defun font-default-object-for-device (&optional device)
(let ((font (font-default-font-for-device device)))
- (unless (cdr-safe (assoc font font-default-cache))
- (push (cons font (font-create-object font)) font-default-cache)
- (cdr-safe (assoc font font-default-cache)))))
+ (or (cdr-safe (assoc font font-default-cache))
+ (let ((object (font-create-object font)))
+ (push (cons font object) font-default-cache)
+ object))))
;;;###autoload
(defun font-default-family-for-device (&optional device)