changeset 34159:a734985ec0bc

(x_produce_glyphs): If a font for a component of a composition is not found, use 1 pixel dot ascent and 0 dot descent value to avoid displaying terribly tall empty boxes.
author Kenichi Handa <handa@m17n.org>
date Mon, 04 Dec 2000 01:20:30 +0000
parents 61b860583831
children bb9ec0151423
files src/xterm.c
diffstat 1 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/xterm.c	Mon Dec 04 01:20:05 2000 +0000
+++ b/src/xterm.c	Mon Dec 04 01:20:30 2000 +0000
@@ -2108,8 +2108,8 @@
 	  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 @@
 		    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 @@
 	      else
 		{
 		  width = FONT_WIDTH (font);
-		  ascent = font->ascent;
-		  descent = font->descent;
+		  ascent = 1;
+		  descent = 0;
 		}
 
 	      if (cmp->method != COMPOSITION_WITH_RULE_ALTCHARS)