+ if (i == 0)
+ {
+ XSetFont (s->dpy, gc, font->fid);
+ XSetForeground (s->dpy, gc, WhitePixelOfScreen (s->xgwa.screen));
+# ifdef HAVE_COCOA
+ jwxyz_XSetAntiAliasing (s->dpy, gc, s->debug_metrics_antialiasing_p);
+# endif
+ sprintf (txt2, "%c [XX%cXX] [%c%c%c%c]",
+ s->debug_metrics_p, s->debug_metrics_p,
+ s->debug_metrics_p, s->debug_metrics_p,
+ s->debug_metrics_p, s->debug_metrics_p);
+ XDrawString (s->dpy, dest, gc,
+ x + (sc*cc.rbearing/2) - cc.rbearing/2, ascent + 10,
+ txt2, strlen(txt2));
+# ifdef HAVE_COCOA
+ jwxyz_XSetAntiAliasing (s->dpy, gc, False);
+# endif
+ XSetFont (s->dpy, gc, font2->fid);
+ sprintf (txt2, "%c %3d 0%03o 0x%02x%s",
+ s->debug_metrics_p, s->debug_metrics_p,
+ s->debug_metrics_p, s->debug_metrics_p,
+ (txt[0] < font->min_char_or_byte2 ? " *" : ""));
+ XDrawString (s->dpy, dest, gc,
+ 10, 20,
+ txt2, strlen(txt2));
+ }
+
+# ifdef HAVE_COCOA
+ jwxyz_XSetAntiAliasing (s->dpy, gc, True);
+# endif
+
+ XSetFont (s->dpy, gc, font2->fid);
+
+ XSetForeground (s->dpy, gc, red);
+
+ sprintf (txt2, "%s ascent %d",
+ (i == 0 ? "char" : "overall"),
+ ascent);
+ XDrawString (s->dpy, dest, gc, 10, y - sc*ascent - 2,
+ txt2, strlen(txt2));
+ XDrawLine (s->dpy, dest, gc, 0, y - sc*ascent, x3, y - sc*ascent);
+
+ sprintf (txt2, "%s descent %d",
+ (i == 0 ? "char" : "overall"),
+ descent);
+ XDrawString (s->dpy, dest, gc, 10, y + sc*descent - 2,
+ txt2, strlen(txt2));
+ XDrawLine (s->dpy, dest, gc, 0, y + sc*descent, x3, y + sc*descent);
+
+
+ /* ascent, descent, baseline */
+
+ XSetForeground (s->dpy, gc, green);
+
+ sprintf (txt2, "ascent %d", cc.ascent);
+ if (cc.ascent != 0)
+ XDrawString (s->dpy, dest, gc, x1, y - sc*cc.ascent - 2,
+ txt2, strlen(txt2));
+ XDrawLine (s->dpy, dest, gc,
+ x1, y - sc*cc.ascent, x2, y - sc*cc.ascent);
+
+ sprintf (txt2, "descent %d", cc.descent);
+ if (cc.descent != 0)
+ XDrawString (s->dpy, dest, gc, x1, y + sc*cc.descent - 2,
+ txt2, strlen(txt2));
+ XDrawLine (s->dpy, dest, gc,
+ x1, y + sc*cc.descent, x2, y + sc*cc.descent);
+
+ XSetForeground (s->dpy, gc, yellow);
+ strcpy (txt2, "baseline");
+ XDrawString (s->dpy, dest, gc, x1, y - 2,
+ txt2, strlen(txt2));
+ XDrawLine (s->dpy, dest, gc, x1, y, x2, y);
+
+
+ /* origin, width */
+
+ XSetForeground (s->dpy, gc, blue);
+
+ strcpy (txt2, "origin");
+ XDrawString (s->dpy, dest, gc,
+ x + 2, y + sc*(descent + 10),
+ txt2, strlen(txt2));
+ XDrawLine (s->dpy, dest, gc,
+ x, y - sc*(ascent - 10),
+ x, y + sc*(descent + 10));
+
+ sprintf (txt2, "width %d", cc.width);
+ XDrawString (s->dpy, dest, gc,
+ x + sc*cc.width + 2,
+ y + sc*(descent + 10) + 10,
+ txt2, strlen(txt2));
+ XDrawLine (s->dpy, dest, gc,
+ x + sc*cc.width, y - sc*(ascent - 10),
+ x + sc*cc.width, y + sc*(descent + 10));
+
+
+ /* lbearing, rbearing */
+
+ XSetForeground (s->dpy, gc, green);
+
+ sprintf (txt2, "lbearing %d", cc.lbearing);
+ XDrawString (s->dpy, dest, gc, x + sc*cc.lbearing + 2,
+ y + sc * descent + 30,
+ txt2, strlen(txt2));
+ XDrawLine (s->dpy, dest, gc,
+ x + sc*cc.lbearing, y - sc*ascent,
+ x + sc*cc.lbearing, y + sc*descent + 20);
+
+ sprintf (txt2, "rbearing %d", cc.rbearing);
+ XDrawString (s->dpy, dest, gc, x + sc*cc.rbearing + 2,
+ y + sc * descent + 40,
+ txt2, strlen(txt2));
+ XDrawLine (s->dpy, dest, gc,
+ x + sc*cc.rbearing, y - sc*ascent,
+ x + sc*cc.rbearing, y + sc*descent + 40);
+
+ y += sc * (ascent + descent) * 2;