diff src/fontset.c @ 26858:7cc081b4e084

(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.
author Kenichi Handa <handa@m17n.org>
date Wed, 15 Dec 1999 00:12:47 +0000
parents d39ec0a27081
children b888c69e8bf0
line wrap: on
line diff
--- a/src/fontset.c	Wed Dec 15 00:12:19 1999 +0000
+++ b/src/fontset.c	Wed Dec 15 00:12:47 1999 +0000
@@ -37,6 +37,7 @@
 Lisp_Object Vfontset_alias_alist;
 Lisp_Object Vhighlight_wrong_size_font;
 Lisp_Object Vclip_large_size_font;
+Lisp_Object Vvertical_centering_font_regexp;
 
 /* Used as a temporary in macro FS_LOAD_FONT.  */
 int font_idx_temp;
@@ -194,10 +195,15 @@
       return 0;
     }
 
-  /* Fill in fields (CHARSET, ENCODING, and FONT_ENCODER) which are
-     not set by (*load_font_func).  */
+  /* Fill in fields (charset, vertical_centering, encoding, and
+     font_encoder) which are not set by (*load_font_func).  */
   fontp->charset = charset;
 
+  fontp->vertical_centering
+    = (STRINGP (Vvertical_centering_font_regexp)
+       && (fast_c_string_match_ignore_case 
+	   (Vvertical_centering_font_regexp, fontp->full_name) >= 0));
+
   if (fontp->encoding[1] != FONT_ENCODING_NOT_DECIDED)
     {
       /* The font itself tells which code points to be used.  Use this
@@ -842,11 +848,11 @@
 
   DEFVAR_LISP ("ignore-relative-composition", &Vignore_relative_composition,
      "Char table of characters which is not composed relatively.\n\
-If an entry for a character is non-nil, a composite character\n\
+If an entry for a character is non-nil, a composition sequence\n\
 which contains that character is displayed so that\n\
 the glyph of that character is put without considering\n\
 an ascent and descent value of a previous character.");
-  Vuse_default_ascent = Qnil;
+  Vignore_relative_composition = Qnil;
 
   DEFVAR_LISP ("alternate-fontname-alist", &Valternate_fontname_alist,
      "Alist of fontname vs list of the alternate fontnames.\n\
@@ -876,6 +882,13 @@
 The drawback is that you will get some garbage left on your screen.");
   Vclip_large_size_font = Qt;
 
+  DEFVAR_LISP ("vertical-centering-font-regexp",
+	       &Vvertical_centering_font_regexp,
+    "*Regexp matching font names that require vertical centering on display.\n\
+When a character is displayed with such fonts, the character is displayed\n\
+at the vertival center of lines.");
+  Vvertical_centering_font_regexp = Qnil;
+
   defsubr (&Squery_fontset);
   defsubr (&Snew_fontset);
   defsubr (&Sset_fontset_font);