aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenichi Handa1999-12-15 00:12:47 +0000
committerKenichi Handa1999-12-15 00:12:47 +0000
commit810abb8758c265759cbb194d9a34bd54dec63890 (patch)
tree194be9401ce1376062a84fa22b89bd9fdad8ef54 /src
parent21fa1afa724ebcb5dcd1ed2de106de74b9eb0d57 (diff)
downloademacs-810abb8758c265759cbb194d9a34bd54dec63890.tar.gz
emacs-810abb8758c265759cbb194d9a34bd54dec63890.zip
(Vvertical_centering_font_regexp): New variable.
(syms_of_fontset): Declare it as a Lisp variable and initialize. Set Vignore_relative_composition to nil. (fs_load_font): Initialize `vertical_centering' of struct font_info.
Diffstat (limited to 'src')
-rw-r--r--src/fontset.c21
1 files changed, 17 insertions, 4 deletions
diff --git a/src/fontset.c b/src/fontset.c
index 7b602092610..508b6d60655 100644
--- a/src/fontset.c
+++ b/src/fontset.c
@@ -37,6 +37,7 @@ Lisp_Object Valternate_fontname_alist;
37Lisp_Object Vfontset_alias_alist; 37Lisp_Object Vfontset_alias_alist;
38Lisp_Object Vhighlight_wrong_size_font; 38Lisp_Object Vhighlight_wrong_size_font;
39Lisp_Object Vclip_large_size_font; 39Lisp_Object Vclip_large_size_font;
40Lisp_Object Vvertical_centering_font_regexp;
40 41
41/* Used as a temporary in macro FS_LOAD_FONT. */ 42/* Used as a temporary in macro FS_LOAD_FONT. */
42int font_idx_temp; 43int font_idx_temp;
@@ -194,10 +195,15 @@ fs_load_font (f, font_table, charset, fontname, fontset)
194 return 0; 195 return 0;
195 } 196 }
196 197
197 /* Fill in fields (CHARSET, ENCODING, and FONT_ENCODER) which are 198 /* Fill in fields (charset, vertical_centering, encoding, and
198 not set by (*load_font_func). */ 199 font_encoder) which are not set by (*load_font_func). */
199 fontp->charset = charset; 200 fontp->charset = charset;
200 201
202 fontp->vertical_centering
203 = (STRINGP (Vvertical_centering_font_regexp)
204 && (fast_c_string_match_ignore_case
205 (Vvertical_centering_font_regexp, fontp->full_name) >= 0));
206
201 if (fontp->encoding[1] != FONT_ENCODING_NOT_DECIDED) 207 if (fontp->encoding[1] != FONT_ENCODING_NOT_DECIDED)
202 { 208 {
203 /* The font itself tells which code points to be used. Use this 209 /* The font itself tells which code points to be used. Use this
@@ -842,11 +848,11 @@ such a character is displayed on screen.");
842 848
843 DEFVAR_LISP ("ignore-relative-composition", &Vignore_relative_composition, 849 DEFVAR_LISP ("ignore-relative-composition", &Vignore_relative_composition,
844 "Char table of characters which is not composed relatively.\n\ 850 "Char table of characters which is not composed relatively.\n\
845If an entry for a character is non-nil, a composite character\n\ 851If an entry for a character is non-nil, a composition sequence\n\
846which contains that character is displayed so that\n\ 852which contains that character is displayed so that\n\
847the glyph of that character is put without considering\n\ 853the glyph of that character is put without considering\n\
848an ascent and descent value of a previous character."); 854an ascent and descent value of a previous character.");
849 Vuse_default_ascent = Qnil; 855 Vignore_relative_composition = Qnil;
850 856
851 DEFVAR_LISP ("alternate-fontname-alist", &Valternate_fontname_alist, 857 DEFVAR_LISP ("alternate-fontname-alist", &Valternate_fontname_alist,
852 "Alist of fontname vs list of the alternate fontnames.\n\ 858 "Alist of fontname vs list of the alternate fontnames.\n\
@@ -876,6 +882,13 @@ you can set this variable to nil to display the characters without clipping.\n\
876The drawback is that you will get some garbage left on your screen."); 882The drawback is that you will get some garbage left on your screen.");
877 Vclip_large_size_font = Qt; 883 Vclip_large_size_font = Qt;
878 884
885 DEFVAR_LISP ("vertical-centering-font-regexp",
886 &Vvertical_centering_font_regexp,
887 "*Regexp matching font names that require vertical centering on display.\n\
888When a character is displayed with such fonts, the character is displayed\n\
889at the vertival center of lines.");
890 Vvertical_centering_font_regexp = Qnil;
891
879 defsubr (&Squery_fontset); 892 defsubr (&Squery_fontset);
880 defsubr (&Snew_fontset); 893 defsubr (&Snew_fontset);
881 defsubr (&Sset_fontset_font); 894 defsubr (&Sset_fontset_font);