[3598] in Athena Bugs

home help back first fref pref prev next nref lref last post

/etc/Xibm (megapel)

daemon@ATHENA.MIT.EDU (John Carr)
Wed Nov 8 06:21:04 1989

To: bugs@ATHENA.MIT.EDU
Date: Wed, 08 Nov 89 06:20:44 EST
From: John Carr <jfc@ATHENA.MIT.EDU>

There is a bug in text redisplay on the megapel X server for characters
near the bottom edge of the screen.  Characters which do not extend off
the screen, but would if their height were rounded up to the next
multiple of 4, are not displayed.  Here is a fix:

*** /mit/x11/src/server/ddx/ibm/mpel/mpelText.c	Tue Jul 25 20:25:04 1989
--- mpelText.c	Wed Nov  8 06:01:19 1989
***************
*** 229,234 ****
--- 229,235 ----
      char		 wholeStr[MAX_CHARS_PER_CALL] ;
      char		 partStr[MAX_CHARS_PER_CALL] ;
      CARD16		*charsOut ;
+     int			bot_edge;	/* Does bottom edge of screen clip ? */
  
      TRACE(("mpelImageText( 0x%x, 0x%x, (%d,%d), %d, 0x%x)\n", pDraw, pGC, x, y, count, chars,fontEncoding)) ;
  
***************
*** 311,322 ****
  
      ht = ( ( ( fontHeight( xFont ) + 3 ) / 4 ) * 4 ) - fontHeight( xFont ) ;
      wholeTxt.point.x =	x ;
!     wholeTxt.point.y =	MPEL_HEIGHT - y - font->pFI->fontDescent - ht ;
      wholeTxt.reserved =	0 ;
      wholeTxt.length =	n ;
      wholeTxt.string =	wholeStr ;
  
      setFontDimensions( xFont ) ;
  
      for ( i = 0 ; ( i < nbox ) && !allIn ; i++, pbox++ ) {
  	switch ( mpelRectIntersect( pbox, &bbox ) ) {
--- 312,330 ----
  
      ht = ( ( ( fontHeight( xFont ) + 3 ) / 4 ) * 4 ) - fontHeight( xFont ) ;
      wholeTxt.point.x =	x ;
!     bot_edge = ((wholeTxt.point.y = MPEL_HEIGHT - y - font->pFI->fontDescent - ht) < 0);
      wholeTxt.reserved =	0 ;
      wholeTxt.length =	n ;
      wholeTxt.string =	wholeStr ;
  
      setFontDimensions( xFont ) ;
+ 
+     if(bot_edge)
+       {
+ 	TRACE(("Bottom edge effects in mpelImageText (ht = %d).\n", ht));
+ 	backrect.height += ht;
+ 	bbox.y2 += ht;
+       }
  
      for ( i = 0 ; ( i < nbox ) && !allIn ; i++, pbox++ ) {
  	switch ( mpelRectIntersect( pbox, &bbox ) ) {

home help back first fref pref prev next nref lref last post