Thread View: comp.sys.ibm.pc.rt
1 messages
1 total messages
Started by John F Carr
Thu, 09 Nov 1989 06:13
Fix for text bug on X11 megapel
Author: 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)
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads