diff options
| author | Vinicius Jose Latorre | 2008-01-09 03:27:04 +0000 |
|---|---|---|
| committer | Vinicius Jose Latorre | 2008-01-09 03:27:04 +0000 |
| commit | fd7ec851c6ca45adc3f060b8f824820080abc674 (patch) | |
| tree | 244d4fed8411ac854b24da8a5395e0860e704d01 | |
| parent | 01f5d76d8ce80d80839dae3d275dd22f71389bc4 (diff) | |
| download | emacs-fd7ec851c6ca45adc3f060b8f824820080abc674.tar.gz emacs-fd7ec851c6ca45adc3f060b8f824820080abc674.zip | |
Fix face attributes recognition
| -rw-r--r-- | lisp/ChangeLog.unicode | 11 | ||||
| -rw-r--r-- | lisp/ps-def.el | 24 | ||||
| -rw-r--r-- | lisp/ps-print.el | 15 | ||||
| -rw-r--r-- | lisp/ps-samp.el | 3 |
4 files changed, 43 insertions, 10 deletions
diff --git a/lisp/ChangeLog.unicode b/lisp/ChangeLog.unicode index f842822671e..5bc4ad99299 100644 --- a/lisp/ChangeLog.unicode +++ b/lisp/ChangeLog.unicode | |||
| @@ -1,3 +1,14 @@ | |||
| 1 | 2008-01-09 Vinicius Jose Latorre <viniciusjl@ig.com.br> | ||
| 2 | |||
| 3 | * ps-print.el: Some face attributes (like :strike-through) was not | ||
| 4 | being recognised. Reported by Leo <sdl.web@gmail.com>. | ||
| 5 | (ps-print-version): New version 7.3.2. | ||
| 6 | (ps-screen-to-bit-face): Fix code. Call ps-face-strikout-p, | ||
| 7 | ps-face-overline-p and ps-face-box-p funs. | ||
| 8 | |||
| 9 | * ps-def.el (ps-face-strikout-p, ps-face-overline-p, ps-face-box-p): | ||
| 10 | New funs. | ||
| 11 | |||
| 1 | 2008-01-09 Kenichi Handa <handa@ni.aist.go.jp> | 12 | 2008-01-09 Kenichi Handa <handa@ni.aist.go.jp> |
| 2 | 13 | ||
| 3 | * international/fontset.el (font-encoding-alist): Add an entry for | 14 | * international/fontset.el (font-encoding-alist): Add an entry for |
diff --git a/lisp/ps-def.el b/lisp/ps-def.el index 3903fc0ef3f..30453f87463 100644 --- a/lisp/ps-def.el +++ b/lisp/ps-def.el | |||
| @@ -1,13 +1,12 @@ | |||
| 1 | ;;; ps-def.el --- XEmacs and Emacs definitions for ps-print | 1 | ;;; ps-def.el --- XEmacs and Emacs definitions for ps-print |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2007 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2007, 2008 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Vinicius Jose Latorre <viniciusjl@ig.com.br> | 5 | ;; Author: Vinicius Jose Latorre <viniciusjl@ig.com.br> |
| 6 | ;; Kenichi Handa <handa@m17n.org> (multi-byte characters) | 6 | ;; Kenichi Handa <handa@m17n.org> (multi-byte characters) |
| 7 | ;; Maintainer: Kenichi Handa <handa@m17n.org> (multi-byte characters) | 7 | ;; Maintainer: Kenichi Handa <handa@m17n.org> (multi-byte characters) |
| 8 | ;; Vinicius Jose Latorre <viniciusjl@ig.com.br> | 8 | ;; Vinicius Jose Latorre <viniciusjl@ig.com.br> |
| 9 | ;; Keywords: wp, print, PostScript | 9 | ;; Keywords: wp, print, PostScript |
| 10 | ;; Version: 7.2.2 | ||
| 11 | ;; X-URL: http://www.emacswiki.org/cgi-bin/wiki/ViniciusJoseLatorre | 10 | ;; X-URL: http://www.emacswiki.org/cgi-bin/wiki/ViniciusJoseLatorre |
| 12 | 11 | ||
| 13 | ;; This file is part of GNU Emacs. | 12 | ;; This file is part of GNU Emacs. |
| @@ -241,6 +240,15 @@ | |||
| 241 | (memq face ps-italic-faces))) ; Kludge-compatible | 240 | (memq face ps-italic-faces))) ; Kludge-compatible |
| 242 | 241 | ||
| 243 | 242 | ||
| 243 | (defalias 'ps-face-strikeout-p 'ignore) | ||
| 244 | |||
| 245 | |||
| 246 | (defalias 'ps-face-overline-p 'ignore) | ||
| 247 | |||
| 248 | |||
| 249 | (defalias 'ps-face-box-p 'ignore) | ||
| 250 | |||
| 251 | |||
| 244 | ;; XEmacs will have to make do with %s (princ) for floats. | 252 | ;; XEmacs will have to make do with %s (princ) for floats. |
| 245 | (defvar ps-color-format "%s %s %s") | 253 | (defvar ps-color-format "%s %s %s") |
| 246 | (defvar ps-float-format "%s ") | 254 | (defvar ps-float-format "%s ") |
| @@ -362,6 +370,18 @@ | |||
| 362 | (memq face ps-italic-faces))) | 370 | (memq face ps-italic-faces))) |
| 363 | 371 | ||
| 364 | 372 | ||
| 373 | (defun ps-face-strikeout-p (face) | ||
| 374 | (eq (face-attribute face :strike-through) t)) | ||
| 375 | |||
| 376 | |||
| 377 | (defun ps-face-overline-p (face) | ||
| 378 | (eq (face-attribute face :overline) t)) | ||
| 379 | |||
| 380 | |||
| 381 | (defun ps-face-box-p (face) | ||
| 382 | (not (memq (face-attribute face :box) '(nil unspecified)))) | ||
| 383 | |||
| 384 | |||
| 365 | ;; Emacs understands the %f format; we'll use it to limit color RGB values | 385 | ;; Emacs understands the %f format; we'll use it to limit color RGB values |
| 366 | ;; to three decimals to cut down some on the size of the PostScript output. | 386 | ;; to three decimals to cut down some on the size of the PostScript output. |
| 367 | (defvar ps-color-format "%0.3f %0.3f %0.3f") | 387 | (defvar ps-color-format "%0.3f %0.3f %0.3f") |
diff --git a/lisp/ps-print.el b/lisp/ps-print.el index dd1800e714f..6a44a6c5ef6 100644 --- a/lisp/ps-print.el +++ b/lisp/ps-print.el | |||
| @@ -10,11 +10,11 @@ | |||
| 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: 7.3.1 | 13 | ;; Version: 7.3.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 "7.3.1" | 16 | (defconst ps-print-version "7.3.2" |
| 17 | "ps-print.el, v 7.3.1 <2007/11/21 vinicius> | 17 | "ps-print.el, v 7.3.2 <2008/01/09 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 |
| @@ -6361,9 +6361,12 @@ If FACE is not a valid face name, use default face." | |||
| 6361 | 6361 | ||
| 6362 | (defun ps-screen-to-bit-face (face) | 6362 | (defun ps-screen-to-bit-face (face) |
| 6363 | (cons face | 6363 | (cons face |
| 6364 | (vector (logior (if (ps-face-bold-p face) 1 0) ; bold | 6364 | (vector (logior (if (ps-face-bold-p face) 1 0) ; bold |
| 6365 | (if (ps-face-italic-p face) 2 0) ; italic | 6365 | (if (ps-face-italic-p face) 2 0) ; italic |
| 6366 | (if (ps-face-underlined-p face) 4 0)) ; underline | 6366 | (if (ps-face-underlined-p face) 4 0) ; underline |
| 6367 | (if (ps-face-strikeout-p face) 8 0) ; strikeout | ||
| 6368 | (if (ps-face-overline-p face) 16 0) ; overline | ||
| 6369 | (if (ps-face-box-p face) 64 0)) ; box | ||
| 6367 | (ps-face-foreground-name face) | 6370 | (ps-face-foreground-name face) |
| 6368 | (ps-face-background-name face)))) | 6371 | (ps-face-background-name face)))) |
| 6369 | 6372 | ||
diff --git a/lisp/ps-samp.el b/lisp/ps-samp.el index a8e4086fe0b..ffe434b1815 100644 --- a/lisp/ps-samp.el +++ b/lisp/ps-samp.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; ps-samp.el --- ps-print sample setup code | 1 | ;;; ps-samp.el --- ps-print sample setup code |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2007 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2007, 2008 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Jim Thompson (was <thompson@wg2.waii.com>) | 5 | ;; Author: Jim Thompson (was <thompson@wg2.waii.com>) |
| 6 | ;; Jacques Duthen (was <duthen@cegelec-red.fr>) | 6 | ;; Jacques Duthen (was <duthen@cegelec-red.fr>) |
| @@ -9,7 +9,6 @@ | |||
| 9 | ;; Maintainer: Kenichi Handa <handa@m17n.org> (multi-byte characters) | 9 | ;; Maintainer: Kenichi Handa <handa@m17n.org> (multi-byte characters) |
| 10 | ;; Vinicius Jose Latorre <viniciusjl@ig.com.br> | 10 | ;; Vinicius Jose Latorre <viniciusjl@ig.com.br> |
| 11 | ;; Keywords: wp, print, PostScript | 11 | ;; Keywords: wp, print, PostScript |
| 12 | ;; Version: 7.2.2 | ||
| 13 | ;; X-URL: http://www.emacswiki.org/cgi-bin/wiki/ViniciusJoseLatorre | 12 | ;; X-URL: http://www.emacswiki.org/cgi-bin/wiki/ViniciusJoseLatorre |
| 14 | 13 | ||
| 15 | ;; This file is part of GNU Emacs. | 14 | ;; This file is part of GNU Emacs. |