emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/lisp/play/gamegrid.el,v


From: Miles Bader
Subject: [Emacs-diffs] Changes to emacs/lisp/play/gamegrid.el,v
Date: Fri, 01 Feb 2008 16:03:31 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     Miles Bader <miles>     08/02/01 16:01:31

Index: lisp/play/gamegrid.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/play/gamegrid.el,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -b -r1.33 -r1.34
--- lisp/play/gamegrid.el       8 Jan 2008 20:44:08 -0000       1.33
+++ lisp/play/gamegrid.el       1 Feb 2008 16:01:30 -0000       1.34
@@ -320,7 +320,14 @@
                          (< max-height height))
                      (setq max-height height))))))
       (when (and max-height (< max-height 1))
-       (face-spec-set gamegrid-face `((t :height ,max-height)))))))
+       (let ((default-font-height (face-attribute 'default :height))
+             (resy (/ (display-pixel-height) (/ (display-mm-height) 25.4)))
+             point-size pixel-size)
+         (setq point-size (/ (* (float default-font-height) max-height) 10)
+               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))))))))))
 
 (defun gamegrid-initialize-display ()
   (setq gamegrid-display-mode (gamegrid-display-type))




reply via email to

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