diff options
| author | Eli Zaretskii | 2016-10-08 22:03:51 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2016-10-08 22:03:51 +0300 |
| commit | 4ff4b66df8da175d8df292d12a30ab50285b6917 (patch) | |
| tree | e08622cd6b0790172a9c2082a652876720e33e4f /src | |
| parent | c03d44bb3d975a982a9d84eea54b73cc3d049035 (diff) | |
| download | emacs-4ff4b66df8da175d8df292d12a30ab50285b6917.tar.gz emacs-4ff4b66df8da175d8df292d12a30ab50285b6917.zip | |
Allow selection of font for symbols as in Emacs 24.x
* src/fontset.c (syms_of_fontset) <use-default-font-for-symbols>:
New boolean variable.
(face_for_char): Use it to fall back to pre-Emacs 25.1 behavior
when selecting fonts for displaying symbol and punctuation
characters. (Bug#24644)
* etc/NEWS: Mention the new variable.
Diffstat (limited to 'src')
| -rw-r--r-- | src/fontset.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/fontset.c b/src/fontset.c index dc037a807cd..74e7df5ae09 100644 --- a/src/fontset.c +++ b/src/fontset.c | |||
| @@ -883,7 +883,8 @@ face_for_char (struct frame *f, struct face *face, int c, | |||
| 883 | if (ASCII_CHAR_P (c) || CHAR_BYTE8_P (c)) | 883 | if (ASCII_CHAR_P (c) || CHAR_BYTE8_P (c)) |
| 884 | return face->ascii_face->id; | 884 | return face->ascii_face->id; |
| 885 | 885 | ||
| 886 | if (c > 0 && EQ (CHAR_TABLE_REF (Vchar_script_table, c), Qsymbol)) | 886 | if (use_default_font_for_symbols /* let the user disable this feature */ |
| 887 | && c > 0 && EQ (CHAR_TABLE_REF (Vchar_script_table, c), Qsymbol)) | ||
| 887 | { | 888 | { |
| 888 | /* Fonts often have characters for punctuation and other | 889 | /* Fonts often have characters for punctuation and other |
| 889 | symbols, even if they don't match the 'symbol' script. So | 890 | symbols, even if they don't match the 'symbol' script. So |
| @@ -2112,6 +2113,16 @@ This affects how a composite character which contains | |||
| 2112 | such a character is displayed on screen. */); | 2113 | such a character is displayed on screen. */); |
| 2113 | Vuse_default_ascent = Qnil; | 2114 | Vuse_default_ascent = Qnil; |
| 2114 | 2115 | ||
| 2116 | DEFVAR_BOOL ("use-default-font-for-symbols", use_default_font_for_symbols, | ||
| 2117 | doc: /* | ||
| 2118 | If non-nil, use the default face's font for symbols and punctuation. | ||
| 2119 | |||
| 2120 | By default, Emacs will try to use the default face's font for | ||
| 2121 | displaying symbol and punctuation characters, disregarding the | ||
| 2122 | fontsets, if the default font can display the character. | ||
| 2123 | Set this to nil to make Emacs honor the fontsets instead. */); | ||
| 2124 | use_default_font_for_symbols = 1; | ||
| 2125 | |||
| 2115 | DEFVAR_LISP ("ignore-relative-composition", Vignore_relative_composition, | 2126 | DEFVAR_LISP ("ignore-relative-composition", Vignore_relative_composition, |
| 2116 | doc: /* | 2127 | doc: /* |
| 2117 | Char table of characters which are not composed relatively. | 2128 | Char table of characters which are not composed relatively. |