emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

feature/android 0aa19e993b1 2/9: Fix gamegrid.el with high resolution di


From: Po Lu
Subject: feature/android 0aa19e993b1 2/9: Fix gamegrid.el with high resolution displays
Date: Sun, 19 Feb 2023 09:14:47 -0500 (EST)

branch: feature/android
commit 0aa19e993b1603d9cadc47c172f998f4d89b9e49
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>

    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))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]