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

[mgp-users-jp 00287] Re: calculation of maxascent



>>>>> On Wed, 16 Sep 1998 12:20:10 +0900, Jun-ichiro itojun Itoh <itojun@iijlab.net> said:

>>> maxascent の計算の際、行の折り返し直後の fragment の ascent が前の
>>> 行の方に反映されるため、変な表示になることがあります。
>> こっちはいま調べているところです。うう、やっぱり行折曲げはめんどく
>> さい。

> 	quickhackですが直しました。今後のversionでは直ってるはずです。

[mgp-users-jp 00278] の前半の方の問題(表示されない文字がある)が直って
いないようです。

--- draw.c.dist	Wed Sep 16 12:13:01 1998
+++ draw.c	Mon Sep 21 09:57:53 1998
@@ -1103,10 +1103,12 @@
 		state->objlast = thislineend;
 		state->align = backup.align;
 
-		/* fix up x position. */
+		/* fix up x position and maxascent. */
 		for (tail = state->obj; tail; tail = tail->next) {
 			tail->x -= startwidth;
 			tail->x += state->leftfillpos;
+			if (state->maxascent < tail->ascent)
+				state->maxascent = tail->ascent;
 		}
 	}
 }

ちなみに私の環境(freetype有, VFlib有, 800x600)では、このパッチを当てな
いと、sample/tutorial.mgp の5ページ目で core を吐いたり、文字の上側が
欠けたりします。

それから、

        if (verbose) {
                fprintf(stderr, "...%s...",
                        ...,  registry, ... );
        }

のようなところが何か所かありますが、Solaris では、registry == NULL の
場合に segmentation fault を起こしてしまいます。

					山本 光晴
				mituharu@math.s.chiba-u.ac.jp