User: aidan
Date: 05/03/25 16:58:05
Modified: xemacs/lisp ChangeLog font.el
Log:
Fix pixel-to-point conversion arithmetic in font.el--thank you, Ralf Angeli.
Revision Changes Path
1.654 +5 -0 XEmacs/xemacs/lisp/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/ChangeLog,v
retrieving revision 1.653
retrieving revision 1.654
diff -u -p -r1.653 -r1.654
--- ChangeLog 2005/03/17 09:26:07 1.653
+++ ChangeLog 2005/03/25 15:58:02 1.654
@@ -1,3 +1,8 @@
+2005-03-25 Ralf Angeli <angeli(a)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(a)xemacs.org>
* files.el: Merge the following changes from GNU Emacs:
1.17 +3 -3 XEmacs/xemacs/lisp/font.el
Index: font.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/font.el,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -p -r1.16 -r1.17
--- font.el 2005/01/28 02:58:40 1.16
+++ font.el 2005/03/25 15:58:03 1.17
@@ -311,8 +311,8 @@ Canonical sizes are in points. If SPEC
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 @@ The type may be the strings \"px\", \"pi
(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"))
Show replies by date