diff options
| author | Paul Eggert | 2016-05-13 13:30:33 -0700 |
|---|---|---|
| committer | Eli Zaretskii | 2016-09-23 16:55:52 +0300 |
| commit | 9135bd7af7bdf9f805b185a77fe4e6d33dec4009 (patch) | |
| tree | 3dbebfada02bbb3369d4838a82bc261e4a694bfd /lisp | |
| parent | e0dd65cd444fd9e5ee6b5921936c6c829df75e50 (diff) | |
| download | emacs-9135bd7af7bdf9f805b185a77fe4e6d33dec4009.tar.gz emacs-9135bd7af7bdf9f805b185a77fe4e6d33dec4009.zip | |
Improve display of tex-verbatim and Info quoted
Problem reported by Glenn Morris (Bug#19889).
* doc/emacs/display.texi (Standard Faces):
* doc/lispref/display.texi (Basic Faces):
* etc/NEWS: Mention fixed-pitch-serif.
* lisp/faces.el (face-font-family-alternatives):
New family alias Monospace Serif.
(fixed-pitch-serif): New face, which uses the new family.
* lisp/info.el (Info-quoted):
* lisp/textmodes/tex-mode.el (tex-verbatim): Use the new face.
* test/lisp/legacy/font-parse-tests.el (font-parse-tests--data):
Add test case for Monospace Serif.
This is backport from master
(cherry picked from commit 36906806ccfc0e53f1d8c365ab0d7151288b7833)
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/faces.el | 29 | ||||
| -rw-r--r-- | lisp/info.el | 2 | ||||
| -rw-r--r-- | lisp/textmodes/tex-mode.el | 3 |
3 files changed, 31 insertions, 3 deletions
diff --git a/lisp/faces.el b/lisp/faces.el index fddc036c13e..b1ea0f0fc34 100644 --- a/lisp/faces.el +++ b/lisp/faces.el | |||
| @@ -98,7 +98,31 @@ a font height that isn't optimal." | |||
| 98 | (defcustom face-font-family-alternatives | 98 | (defcustom face-font-family-alternatives |
| 99 | (mapcar (lambda (arg) (mapcar 'purecopy arg)) | 99 | (mapcar (lambda (arg) (mapcar 'purecopy arg)) |
| 100 | '(("Monospace" "courier" "fixed") | 100 | '(("Monospace" "courier" "fixed") |
| 101 | |||
| 102 | ;; Monospace Serif is an Emacs invention, intended to work around | ||
| 103 | ;; portability problems when using Courier. It should work well | ||
| 104 | ;; when combined with Monospaced and with other standard fonts. | ||
| 105 | ("Monospace Serif" | ||
| 106 | |||
| 107 | ;; This looks good on GNU/Linux. | ||
| 108 | "Courier 10 Pitch" | ||
| 109 | ;; This looks good on MS-Windows and OS X. | ||
| 110 | "Consolas" | ||
| 111 | ;; This looks good on OS X. "Courier" looks good too, but is | ||
| 112 | ;; jagged on GNU/Linux and so is listed later as "courier". | ||
| 113 | "Courier Std" | ||
| 114 | ;; Although these are anti-aliased, they are a bit faint compared | ||
| 115 | ;; to the above. | ||
| 116 | "FreeMono" "Nimbus Mono L" | ||
| 117 | ;; These are aliased and look jagged. | ||
| 118 | "courier" "fixed" | ||
| 119 | ;; Omit Courier New, as it is the default MS-Windows font and so | ||
| 120 | ;; would look no different, and is pretty faint on other platforms. | ||
| 121 | ) | ||
| 122 | |||
| 123 | ;; This is present for backward compatibility. | ||
| 101 | ("courier" "CMU Typewriter Text" "fixed") | 124 | ("courier" "CMU Typewriter Text" "fixed") |
| 125 | |||
| 102 | ("Sans Serif" "helv" "helvetica" "arial" "fixed") | 126 | ("Sans Serif" "helv" "helvetica" "arial" "fixed") |
| 103 | ("helv" "helvetica" "arial" "fixed"))) | 127 | ("helv" "helvetica" "arial" "fixed"))) |
| 104 | "Alist of alternative font family names. | 128 | "Alist of alternative font family names. |
| @@ -2280,6 +2304,11 @@ If you set `term-file-prefix' to nil, this function does nothing." | |||
| 2280 | "The basic fixed-pitch face." | 2304 | "The basic fixed-pitch face." |
| 2281 | :group 'basic-faces) | 2305 | :group 'basic-faces) |
| 2282 | 2306 | ||
| 2307 | (defface fixed-pitch-serif | ||
| 2308 | '((t :family "Monospace Serif")) | ||
| 2309 | "The basic fixed-pitch face with serifs." | ||
| 2310 | :group 'basic-faces) | ||
| 2311 | |||
| 2283 | (defface variable-pitch | 2312 | (defface variable-pitch |
| 2284 | '((((type w32)) | 2313 | '((((type w32)) |
| 2285 | ;; This is a kludgy workaround for an issue discussed in | 2314 | ;; This is a kludgy workaround for an issue discussed in |
diff --git a/lisp/info.el b/lisp/info.el index 6426cfcf9ed..ae46fba25b9 100644 --- a/lisp/info.el +++ b/lisp/info.el | |||
| @@ -4236,7 +4236,7 @@ With a zero prefix arg, put the name inside a function call to `info'." | |||
| 4236 | "Syntax table used in `Info-mode'.") | 4236 | "Syntax table used in `Info-mode'.") |
| 4237 | 4237 | ||
| 4238 | (defface Info-quoted | 4238 | (defface Info-quoted |
| 4239 | '((t :family "courier")) | 4239 | '((t :inherit fixed-pitch-serif)) |
| 4240 | "Face used for quoted elements.") | 4240 | "Face used for quoted elements.") |
| 4241 | 4241 | ||
| 4242 | (defvar Info-mode-font-lock-keywords | 4242 | (defvar Info-mode-font-lock-keywords |
diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el index 3ac68bdf790..8545a09fa59 100644 --- a/lisp/textmodes/tex-mode.el +++ b/lisp/textmodes/tex-mode.el | |||
| @@ -801,8 +801,7 @@ Not smaller than the value set by `tex-suscript-height-minimum'." | |||
| 801 | (defvar tex-math-face 'tex-math) | 801 | (defvar tex-math-face 'tex-math) |
| 802 | 802 | ||
| 803 | (defface tex-verbatim | 803 | (defface tex-verbatim |
| 804 | ;; '((t :inherit font-lock-string-face)) | 804 | '((t :inherit fixed-pitch-serif)) |
| 805 | '((t :family "courier")) | ||
| 806 | "Face used to highlight TeX verbatim environments." | 805 | "Face used to highlight TeX verbatim environments." |
| 807 | :group 'tex) | 806 | :group 'tex) |
| 808 | (define-obsolete-face-alias 'tex-verbatim-face 'tex-verbatim "22.1") | 807 | (define-obsolete-face-alias 'tex-verbatim-face 'tex-verbatim "22.1") |