changeset 34222:7e09cff3b2ab

(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. (expose_area): Pass x-coordinate relative to the exposed area to x_draw_glyphs instead of a window-relative coordinate.
author Jason Rumney <jasonr@gnu.org>
date Tue, 05 Dec 2000 19:21:35 +0000
parents e31ac0d22ff8
children 258a6644c200
files src/w32term.c
diffstat 1 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/src/w32term.c	Tue Dec 05 19:18:23 2000 +0000
+++ b/src/w32term.c	Tue Dec 05 19:21:35 2000 +0000
@@ -2287,8 +2287,8 @@
             font_type = UNICODE_FONT;
 
 	  /* Initialize the bounding box.  */
-	  pcm = w32_per_char_metric (font, &char2b, font_type);
-	  if (pcm)
+	  if (font_info
+              && (pcm = w32_per_char_metric (font, &char2b, font_type)))
 	    {
 	      width = pcm->width;
 	      ascent = pcm->ascent;
@@ -2352,8 +2352,8 @@
               else
                 font_type = UNICODE_FONT;
 
-	      pcm = w32_per_char_metric (font, &char2b, font_type);
-	      if (pcm)
+	      if (font_info
+                  && (pcm = w32_per_char_metric (font, &char2b, font_type)))
 		{
 		  width = pcm->width;
 		  ascent = pcm->ascent;
@@ -2362,8 +2362,8 @@
 	      else
 		{
 		  width = FONT_WIDTH (font);
-		  ascent = FONT_BASE (font);
-		  descent = FONT_DESCENT (font);
+		  ascent = 1;
+		  descent = 0;
 		}
 
 	      if (cmp->method != COMPOSITION_WITH_RULE_ALTCHARS)
@@ -5546,7 +5546,7 @@
       
       /* Repaint.  */
       if (last > first)
-        x_draw_glyphs (w, first_x, row, area,
+        x_draw_glyphs (w, first_x - start_x, row, area,
                        first - row->glyphs[area],
                        last - row->glyphs[area],
                        row->inverse_p ? DRAW_INVERSE_VIDEO : DRAW_NORMAL_TEXT,