changeset 19276:b2c5e1bea50e

(dumpglyphs): Pay attention to Vignore_relative_composition.
author Kenichi Handa <handa@m17n.org>
date Sun, 10 Aug 1997 04:13:19 +0000
parents 0fb8728cd236
children 7ea957cd48e2
files src/xterm.c
diffstat 1 files changed, 23 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/src/xterm.c	Sun Aug 10 04:09:49 1997 +0000
+++ b/src/xterm.c	Sun Aug 10 04:13:19 1997 +0000
@@ -1013,17 +1013,32 @@
 		    if (relative_compose)
 		      {
 			pcm = PER_CHAR_METRIC (font, x_2byte_buffer + i);
-			if (- pcm->descent >= relative_compose)
+			if (NILP (Vignore_relative_composition)
+			    || NILP (Faref (Vignore_relative_composition,
+					    make_number (cmpcharp->glyph[gidx]))))
 			  {
-			    /* Draw above the current glyphs.  */
-			    y_offset = highest + pcm->descent;
-			    highest += pcm->ascent + pcm->descent;
+			    if (- pcm->descent >= relative_compose)
+			      {
+				/* Draw above the current glyphs.  */
+				y_offset = highest + pcm->descent;
+				highest += pcm->ascent + pcm->descent;
+			      }
+			    else if (pcm->ascent <= 0)
+			      {
+				/* Draw beneath the current glyphs.  */
+				y_offset = lowest - pcm->ascent;
+				lowest -= pcm->ascent + pcm->descent;
+			      }
 			  }
-			else if (pcm->ascent <= 0)
+			else
 			  {
-			    /* Draw beneath the current glyphs.  */
-			    y_offset = lowest - pcm->ascent;
-			    lowest -= pcm->ascent + pcm->descent;
+			    /* Draw the glyph at normal position.  If
+                               it sticks out of HIGHEST or LOWEST,
+                               update them appropriately.  */
+			    if (pcm->ascent > highest)
+			      highest = pcm->ascent;
+			    else if (- pcm->descent < lowest)
+			      lowest = - pcm->descent;
 			  }
 		      }
 		    else if (cmpcharp->cmp_rule)