Mercurial > hg > xemacs-beta
changeset 2685:64752935473d
[xemacs-hg @ 2005-03-25 15:58:02 by aidan]
Fix pixel-to-point conversion arithmetic in font.el--thank you, Ralf Angeli.
author | aidan |
---|---|
date | Fri, 25 Mar 2005 15:58:03 +0000 |
parents | 800fef0b5c75 |
children | 263a354405ed |
files | lisp/ChangeLog lisp/font.el |
diffstat | 2 files changed, 8 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Fri Mar 25 01:00:34 2005 +0000 +++ b/lisp/ChangeLog Fri Mar 25 15:58:03 2005 +0000 @@ -1,3 +1,8 @@ +2005-03-25 Ralf Angeli <angeli@iwi.uni-sb.de> + + * font.el (font-spatial-to-canonical): Correct calculation of + return value for pixel-based input value. + 2005-03-17 Mike Sperber <mike@xemacs.org> * files.el: Merge the following changes from GNU Emacs:
--- a/lisp/font.el Fri Mar 25 01:00:34 2005 +0000 +++ b/lisp/font.el Fri Mar 25 15:58:03 2005 +0000 @@ -311,8 +311,8 @@ a number, it is interpreted as the desired point size and returned unchanged. Otherwise SPEC must be a string consisting of a number and an optional type. The type may be the strings \"px\", \"pix\", or \"pixel\" (pixels), \"pt\" or -\"point\" (points), \"pa\" or \"pica\" (picas), \"in\" or \"inch\" (inches), \"cm\" -(centimeters), or \"mm\" (millimeters). +\"point\" (points), \"pa\" or \"pica\" (picas), \"in\" or \"inch\" (inches), +\"cm\" (centimeters), or \"mm\" (millimeters). 1 in = 2.54 cm = 6 pa = 25.4 mm = 72 pt. Pixel size is device-dependent." (cond @@ -351,7 +351,7 @@ (setq num (string-to-number spec)) (cond ((member type '("pixel" "px" "pix")) - (setq retval (* num (/ pix-width mm-width) (/ 25.4 72.0)))) + (setq retval (* num (/ mm-width pix-width) (/ 72.0 25.4)))) ((member type '("point" "pt")) (setq retval num)) ((member type '("pica" "pa"))