From: Po Lu Date: Sun, 19 Feb 2023 11:34:04 +0000 (+0800) Subject: Fix gamegrid.el with high resolution displays X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=0aa19e993b1603d9cadc47c172f998f4d89b9e49;p=emacs.git Fix gamegrid.el with high resolution displays * lisp/play/gamegrid.el (gamegrid-setup-default-font): Clamp font size at eight. --- diff --git a/lisp/play/gamegrid.el b/lisp/play/gamegrid.el index 54df983740e..bf195d6a0ec 100644 --- a/lisp/play/gamegrid.el +++ b/lisp/play/gamegrid.el @@ -411,7 +411,9 @@ convert to an Emacs image-spec instead") pixel-size (floor (* resy (/ point-size 72.27))) point-size (* (/ pixel-size resy) 72.27)) (face-spec-set gamegrid-face - `((t :height ,(floor (* point-size 10)))))))))) + ;; With some very high resolution displays, + ;; point-size floored can be zero. + `((t :height ,(max 8 (floor (* point-size 10))))))))))) (defun gamegrid-initialize-display () (setq gamegrid-display-mode (gamegrid-display-type))