From 0aa19e993b1603d9cadc47c172f998f4d89b9e49 Mon Sep 17 00:00:00 2001 From: Po Lu Date: Sun, 19 Feb 2023 19:34:04 +0800 Subject: [PATCH] Fix gamegrid.el with high resolution displays * lisp/play/gamegrid.el (gamegrid-setup-default-font): Clamp font size at eight. --- lisp/play/gamegrid.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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)) -- 2.39.5