[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

(mgp-users 00398) Re: Some magic point questions/comments/bugs



Hi,
I made a small patch to fix some problems reported from Mr. Messing on this list.
I hope this patch fixes the problem that mgp crashes X system on KDE.
At least, it seems to work in my environment.
If you're interested, please try the patch attached to this mail.

From: "Dean S. Messing" <deanm@sharplabs.com>
Subject: (mgp-users 00381) Some magic point questions/comments/bugs
Date: Wed, 6 Sep 2000 09:56:53 +0900
Message-ID: <>

deanm> Q1.
deanm> which implies that if the default style is un-defined then one can
deanm> put stuff (or not) in the first line (following page).
deanm> Perhaps the exact behaviour of `%page' needs more documentation.

Sorry for a lack of documentation.
But I'd like to suggest back directives should be put in the first line.

deanm> Q2.
deanm> ---
deanm> This question is closely tied to Q1.
deanm> Why does the following wierd behaviour occur?

This is a bug. Please apply the patch attached to this mail.

deanm> Q4.
deanm> ---
deanm> Why does the beautiful MTCORSVA.TTF font from the Microsoft
deanm> Windows 98 / Office 2000 distribution not render well?  Pieces of
deanm> letters are missing.  Yet they render perfectly when I use ftview from
deanm> the freetype-1.3.1 distribution.  Try, for example

This is also a bug. 
I hope that applying the patch in this mail will mitigate this problem.

--
Yoshifumi Nishida <nishida@csl.sony.co.jp>

? new.patch
? new2.patch
Index: draw.c
===================================================================
RCS file: /home/wide/itojun/cvsroot/mgp/kit/draw.c,v
retrieving revision 1.174
diff -c -r1.174 draw.c
*** draw.c	2000/07/17 14:21:25	1.174
--- draw.c	2000/09/10 16:14:50
***************
*** 505,510 ****
--- 505,515 ----
  		break;
  
  	case CTL_BACK:
+ 		if (state->line){
+ 			fprintf(stderr, 
+ 				"warning: %%back directive should be put in the first line of the page. ignored.\n");
+ 			break;
+ 		}
  		back_color[caching] = cp->ctl_value;
  		bg_ctl = cp;	/*update later*/
  		break;
***************
*** 1770,1776 ****
  	}\
  	drawarea[areaindex].x = x;\
  	drawarea[areaindex].y = y - obj->data.X->ascent;\
! 	drawarea[areaindex].width = obj->data.X->charlen+1;\
  	drawarea[areaindex].height = obj->data.X->height+1;\
  	areaindex ++;\
  }
--- 1775,1781 ----
  	}\
  	drawarea[areaindex].x = x;\
  	drawarea[areaindex].y = y - obj->data.X->ascent;\
! 	drawarea[areaindex].width = obj->data.X->xmax+1;\
  	drawarea[areaindex].height = obj->data.X->height+1;\
  	areaindex ++;\
  }
***************
*** 3401,3407 ****
--- 3406,3414 ----
  		target = parent;
  	}
  	XReparentWindow(display, child_window, window, x, y);
+ #if 0
  	XDestroyWindow(display, target);
+ #endif
  }
  
  void
Index: font.c
===================================================================
RCS file: /home/wide/itojun/cvsroot/mgp/kit/font.c,v
retrieving revision 1.25
diff -c -r1.25 font.c
*** font.c	2000/03/02 18:05:35	1.25
--- font.c	2000/09/10 16:14:51
***************
*** 326,332 ****
  	/* horizontal gap of 1 dot is included by default */
  	char_len = max_x - min_x + 2;
  	vfc->xoff = min_x;
! 	vfc->charlen = char_len;
  	vfc->descent = height / VF_DESCENT;
  	vfc->ascent = vfc->height - vfc->descent;
  
--- 326,332 ----
  	/* horizontal gap of 1 dot is included by default */
  	char_len = max_x - min_x + 2;
  	vfc->xoff = min_x;
! 	vfc->charlen = vfc->xmax = char_len;
  	vfc->descent = height / VF_DESCENT;
  	vfc->ascent = vfc->height - vfc->descent;
  
Index: mgp.h
===================================================================
RCS file: /home/wide/itojun/cvsroot/mgp/kit/mgp.h,v
retrieving revision 1.122
diff -c -r1.122 mgp.h
*** mgp.h	2000/07/10 15:51:16	1.122
--- mgp.h	2000/09/10 16:14:54
***************
*** 451,456 ****
--- 451,457 ----
  	u_int height;
  	u_int code;
  	u_int charlen;
+ 	u_int xmax;
  	int ascent;
  	int descent;
  	u_int xoff;
***************
*** 472,477 ****
--- 473,479 ----
  	u_int height;		/* bitmap height */
  	u_int code;
  	u_int charlen;		/* origin x axis advance width */
+ 	u_int xmax;			/* right edge of bbox */
  	int ascent;		/* (top of bitmap) - (origin y axis) */
  	int descent;		/* (origin y axis) - (bottom of bitmap) */
  	int xoff;		/* (left of bitmap) - (origin x axis) */
Index: tfont.c
===================================================================
RCS file: /home/wide/itojun/cvsroot/mgp/kit/tfont.c,v
retrieving revision 1.39
diff -c -r1.39 tfont.c
*** tfont.c	2000/07/10 15:51:18	1.39
--- tfont.c	2000/09/10 16:14:57
***************
*** 530,535 ****
--- 530,536 ----
  	tfc->xoff = metrics.bearingX >> 6;
  	tfc->fontname = strdup(fontname);
  	tfc->charlen = metrics.advance >> 6;
+ 	tfc->xmax = metrics.bbox.xMax >> 6;
  	tfc->ref = 0;
  	tfc->dbitmap = bitmap.bitmap;
  	tfc->regid = get_regid(registry);