Article View: comp.sys.ibm.pc.rt
Article #536Fix for text bug on X11 megapel
From: John F Carr
Date: Thu, 09 Nov 1989 06:13
Date: Thu, 09 Nov 1989 06:13
56 lines
2444 bytes
2444 bytes
There is a bug in the X11R3 megapel server that causes text near the bottom
edge of the screen not to be displayed. This is because the megapel rounds
font sizes up to multiples of 4 pixels internally; the current server does
not detect the case where the character as displayed by the megapel extends
beyond the screen edge but the X character does not. Here is a patch:
*** /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 ) ) {
--John Carr (jfc@athena.mit.edu)
Technical Details
Message-ID:
<15759@bloom-beacon.MIT.EDU>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!bloom-beacon!athena.mit.edu!jfcShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!bloom-beacon!athena.mit.edu!jfc From: jfc@athena.mit.edu (John F Carr) Newsgroups: comp.sys.ibm.pc.rt Subject: Fix for text bug on X11 megapel Message-ID: <15759@bloom-beacon.MIT.EDU> Date: 9 Nov 89 06:13:43 GMT Sender: daemon@bloom-beacon.MIT.EDU Reply-To: jfc@athena.mit.edu (John F Carr) Organization: Massachusetts Institute of Technology Lines: 56