(goto-char (point-min))
(read (current-buffer)))))
+(if (fboundp 'frame-char-width)
+ (defalias 'bitmap-stipple-frame-char-width 'frame-char-width)
+ (defun bitmap-stipple-frame-char-width (&optional frame)
+ "Width in pixels of characters in the font in frame FRAME.
+If FRAME is omitted, the selected frame is used.
+For a terminal screen, the value is always 1."
+ (font-instance-width (face-font (find-face 'default) frame 'ascii))))
+
+(if (fboundp 'frame-char-height)
+ (defalias 'bitmap-stipple-frame-char-height 'frame-char-height)
+ (defun bitmap-stipple-frame-char-width (&optional frame)
+ "Height in pixels of a line in the font in frame FRAME.
+If FRAME is omitted, the selected frame is used.
+For a terminal frame, the value is always 1."
+ (font-instance-height (face-font (find-face 'default) frame 'ascii))))
+
(defun bitmap-stipple-insert-pixmap (pixmap &optional center)
"Insert PIXMAP in the current buffer.
Optional argument CENTER specified, pixmap will be centered."
(let (width height beg i)
(or (facep 'bitmap-stipple-splash)
(make-face 'bitmap-stipple-splash))
- (setq width (/ (car pixmap) (frame-char-width))
- height (/ (cadr pixmap) (frame-char-height)))
+ (setq width (/ (car pixmap) (bitmap-stipple-frame-char-width))
+ height (/ (cadr pixmap) (bitmap-stipple-frame-char-height)))
(set-face-foreground 'bitmap-stipple-splash "red")
(set-face-stipple 'bitmap-stipple-splash pixmap)
(if center (insert-char ?\n height))