Mercurial > emacs
comparison lisp/ps-print.el @ 87654:85fe2f3f4acb
Fix face attributes recognition
author | Vinicius Jose Latorre <viniciusjl@ig.com.br> |
---|---|
date | Wed, 09 Jan 2008 02:54:16 +0000 |
parents | 107ccd98fa12 |
children | b9e8ab94c460 |
comparison
equal
deleted
inserted
replaced
87653:3091cbee6fd8 | 87654:85fe2f3f4acb |
---|---|
8 ;; Vinicius Jose Latorre <viniciusjl@ig.com.br> | 8 ;; Vinicius Jose Latorre <viniciusjl@ig.com.br> |
9 ;; Kenichi Handa <handa@m17n.org> (multi-byte characters) | 9 ;; Kenichi Handa <handa@m17n.org> (multi-byte characters) |
10 ;; Maintainer: Kenichi Handa <handa@m17n.org> (multi-byte characters) | 10 ;; Maintainer: Kenichi Handa <handa@m17n.org> (multi-byte characters) |
11 ;; Vinicius Jose Latorre <viniciusjl@ig.com.br> | 11 ;; Vinicius Jose Latorre <viniciusjl@ig.com.br> |
12 ;; Keywords: wp, print, PostScript | 12 ;; Keywords: wp, print, PostScript |
13 ;; Version: 6.8.1 | 13 ;; Version: 6.8.2 |
14 ;; X-URL: http://www.emacswiki.org/cgi-bin/wiki/ViniciusJoseLatorre | 14 ;; X-URL: http://www.emacswiki.org/cgi-bin/wiki/ViniciusJoseLatorre |
15 | 15 |
16 (defconst ps-print-version "6.8.1" | 16 (defconst ps-print-version "6.8.2" |
17 "ps-print.el, v 6.8.1 <2007/11/21 vinicius> | 17 "ps-print.el, v 6.8.2 <2008/01/08 vinicius> |
18 | 18 |
19 Vinicius's last change version -- this file may have been edited as part of | 19 Vinicius's last change version -- this file may have been edited as part of |
20 Emacs without changes to the version number. When reporting bugs, please also | 20 Emacs without changes to the version number. When reporting bugs, please also |
21 report the version of Emacs, if any, that ps-print was distributed with. | 21 report the version of Emacs, if any, that ps-print was distributed with. |
22 | 22 |
3993 (or (ps-xemacs-face-kind-p face 'ANGLE_NAME "i\\|o") | 3993 (or (ps-xemacs-face-kind-p face 'ANGLE_NAME "i\\|o") |
3994 (ps-xemacs-face-kind-p face 'SLANT "i\\|o") | 3994 (ps-xemacs-face-kind-p face 'SLANT "i\\|o") |
3995 (memq face ps-italic-faces)) ; Kludge-compatible | 3995 (memq face ps-italic-faces)) ; Kludge-compatible |
3996 (or (face-italic-p face) | 3996 (or (face-italic-p face) |
3997 (memq face ps-italic-faces)))) | 3997 (memq face ps-italic-faces)))) |
3998 | |
3999 (defun ps-face-strikeout-p (face) | |
4000 (eq (face-attribute face :strike-through) t)) | |
4001 | |
4002 (defun ps-face-overline-p (face) | |
4003 (eq (face-attribute face :overline) t)) | |
4004 | |
4005 (defun ps-face-box-p (face) | |
4006 (not (memq (face-attribute face :box) '(nil unspecified)))) | |
3998 | 4007 |
3999 (defvar ps-print-color-scale 1.0) | 4008 (defvar ps-print-color-scale 1.0) |
4000 | 4009 |
4001 (defun ps-color-scale (color) | 4010 (defun ps-color-scale (color) |
4002 ;; Scale 16-bit X-COLOR-VALUE to PostScript color value in [0, 1] interval. | 4011 ;; Scale 16-bit X-COLOR-VALUE to PostScript color value in [0, 1] interval. |
6583 face-map)) | 6592 face-map)) |
6584 | 6593 |
6585 | 6594 |
6586 (defun ps-screen-to-bit-face (face) | 6595 (defun ps-screen-to-bit-face (face) |
6587 (cons face | 6596 (cons face |
6588 (vector (logior (if (ps-face-bold-p face) 1 0) ; bold | 6597 (vector (logior (if (ps-face-bold-p face) 1 0) ; bold |
6589 (if (ps-face-italic-p face) 2 0) ; italic | 6598 (if (ps-face-italic-p face) 2 0) ; italic |
6590 (if (ps-face-underlined-p face) 4 0)) ; underline | 6599 (if (ps-face-underlined-p face) 4 0) ; underline |
6600 (if (ps-face-strikeout-p face) 8 0) ; strikeout | |
6601 (if (ps-face-overline-p face) 16 0) ; overline | |
6602 (if (ps-face-box-p face) 64 0)) ; box | |
6591 (ps-face-foreground-name face) | 6603 (ps-face-foreground-name face) |
6592 (ps-face-background-name face)))) | 6604 (ps-face-background-name face)))) |
6593 | 6605 |
6594 | 6606 |
6595 ;; to avoid compilation gripes | 6607 ;; to avoid compilation gripes |