]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix gamegrid.el with high resolution displays
authorPo Lu <luangruo@yahoo.com>
Sun, 19 Feb 2023 11:34:04 +0000 (19:34 +0800)
committerPo Lu <luangruo@yahoo.com>
Sun, 19 Feb 2023 11:34:04 +0000 (19:34 +0800)
* lisp/play/gamegrid.el (gamegrid-setup-default-font): Clamp
font size at eight.

lisp/play/gamegrid.el

index 54df983740eb622b1275fe3ae0972fda3eeaa297..bf195d6a0ec53661d5a51d2dfda6e5f6637fe6fb 100644 (file)
@@ -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))