]> git.eshelyaron.com Git - emacs.git/commitdiff
(x_produce_glyphs): If a font for a component of
authorKenichi Handa <handa@m17n.org>
Mon, 4 Dec 2000 01:20:30 +0000 (01:20 +0000)
committerKenichi Handa <handa@m17n.org>
Mon, 4 Dec 2000 01:20:30 +0000 (01:20 +0000)
a composition is not found, use 1 pixel dot ascent and 0 dot
descent value to avoid displaying terribly tall empty boxes.

src/xterm.c

index 603a6f6e57597d872b7f2bfaf50b461ce8d51b5d..42537902c947551664022e54a39869413aad2739 100644 (file)
@@ -2108,8 +2108,8 @@ x_produce_glyphs (it)
          cmp->font = (void *) font;
 
          /* Initialize the bounding box.  */
-         pcm = x_per_char_metric (font, &char2b);
-         if (pcm)
+         if (font_info
+             && (pcm = x_per_char_metric (font, &char2b)))
            {
              width = pcm->width;
              ascent = pcm->ascent;
@@ -2166,8 +2166,8 @@ x_produce_glyphs (it)
                    boff = VCENTER_BASELINE_OFFSET (font, it->f) - boff;
                }
 
-             pcm = x_per_char_metric (font, &char2b);
-             if (pcm)
+             if (font_info
+                 && (pcm = x_per_char_metric (font, &char2b)))
                {
                  width = pcm->width;
                  ascent = pcm->ascent;
@@ -2176,8 +2176,8 @@ x_produce_glyphs (it)
              else
                {
                  width = FONT_WIDTH (font);
-                 ascent = font->ascent;
-                 descent = font->descent;
+                 ascent = 1;
+                 descent = 0;
                }
 
              if (cmp->method != COMPOSITION_WITH_RULE_ALTCHARS)