]> git.eshelyaron.com Git - emacs.git/commitdiff
(x_produce_glyphs): If a font for a component of
authorJason Rumney <jasonr@gnu.org>
Tue, 5 Dec 2000 19:23:21 +0000 (19:23 +0000)
committerJason Rumney <jasonr@gnu.org>
Tue, 5 Dec 2000 19:23:21 +0000 (19:23 +0000)
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.

src/ChangeLog
src/w32term.c

index 93914d0881579dee0cf8dd94344e2987fcaab090..52f133910e4cc1e40dd85fb95b9553d456bf11dd 100644 (file)
@@ -1,3 +1,11 @@
+2000-12-05  Jason Rumney  <jasonr@gnu.org>
+
+       * w32term.c (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.
+
 2000-12-05  Gerd Moellmann  <gerd@gnu.org>
 
        * keyboard.c (record_char): Don't record identical help-echo
index 23cefb20955a44be8612f9110739ea35d8a98531..1dbe506371ae24651be311fef5ca8333011989e0 100644 (file)
@@ -2287,8 +2287,8 @@ x_produce_glyphs (it)
             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 @@ x_produce_glyphs (it)
               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 @@ x_produce_glyphs (it)
              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 @@ expose_area (w, row, r, area)
       
       /* 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,