mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-21 20:37:38 +00:00
(gamegrid-setup-default-font): Calculate a font
height that doesn't exceed the requested height by rounding off.
This commit is contained in:
parent
3898f05006
commit
34764b7311
1 changed files with 8 additions and 1 deletions
|
|
@ -320,7 +320,14 @@ static unsigned char gamegrid_bits[] = {
|
|||
(< max-height height))
|
||||
(setq max-height height))))))
|
||||
(when (and max-height (< max-height 1))
|
||||
(set-face-attribute gamegrid-face nil :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))
|
||||
(set-face-attribute gamegrid-face nil
|
||||
:height (floor (* point-size 10))))))))
|
||||
|
||||
(defun gamegrid-initialize-display ()
|
||||
(setq gamegrid-display-mode (gamegrid-display-type))
|
||||
|
|
|
|||
Loading…
Reference in a new issue