[Commit] twin ChangeLog, 1.4, 1.5 Makefile.am, 1.3, 1.4 twin.h, 1.4, 1.5 twin_convolve.c, 1.3, 1.4 twin_font.c, 1.1, 1.2 twin_glyphs.c, 1.1, 1.2 twin_hull.c, NONE, 1.1 twin_primitive.c, 1.1.1.1, 1.2 twin_spline.c, 1.1, 1.2 xtwin.c, 1.4, 1.5

Keith Packard commit at keithp.com
Fri Sep 24 18:10:05 PDT 2004


Committed by: keithp

Update of /local/src/CVS/twin
In directory home.keithp.com:/tmp/cvs-serv16089

Modified Files:
	ChangeLog Makefile.am twin.h twin_convolve.c twin_font.c 
	twin_glyphs.c twin_primitive.c twin_spline.c xtwin.c 
Added Files:
	twin_hull.c 
Log Message:
2004-09-24  Keith Packard  <keithp at keithp.com>

	* Makefile.am:
	* twin_hull.c: (_twin_slope_init), (_twin_hull_create),
	(_twin_slope_compare), (_twin_hull_vertex_compare),
	(_twin_hull_prev_valid), (_twin_hull_next_valid),
	(_twin_hull_eliminate_concave), (_twin_hull_to_path),
	(twin_path_convex_hull):
	Add convex hull algorithm from cairo sources.  Used to
	constrain pens to convex shapes so that the convolution
	algorithm works correctly.

	* twin.h:
	Reduce default tolerance to 1/16 of a pixel
	
	* twin_convolve.c: (_angle), (_twin_subpath_convolve),
	(twin_path_convolve):
	Use convex hull of pen.

	* twin_font.c: (compare_snap), (_snap), (_add_snap),
	(twin_path_glyph), (twin_glyph_width), (twin_path_string):
	Snap horizontal and vertical elements of glyphs to
	pixel boundaries.  Snap stem widths to integer amounts.
	Add slanting and emboldening
	
	* twin_glyphs.c:
	Add space and box
	
	* twin_primitive.c:
	Avoid using __inline as it increases size dramatically
	
	* twin_spline.c: (_twin_spline_decompose):
	Use <= tolerance_squared as that may be zero
	
	* xtwin.c: (main):
	Swizzle code to show off recent changes


Index: ChangeLog
===================================================================
RCS file: /local/src/CVS/twin/ChangeLog,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- ChangeLog	24 Sep 2004 04:09:10 -0000	1.4
+++ ChangeLog	25 Sep 2004 01:10:00 -0000	1.5
@@ -1,3 +1,40 @@
+2004-09-24  Keith Packard  <keithp at keithp.com>
+
+	* Makefile.am:
+	* twin_hull.c: (_twin_slope_init), (_twin_hull_create),
+	(_twin_slope_compare), (_twin_hull_vertex_compare),
+	(_twin_hull_prev_valid), (_twin_hull_next_valid),
+	(_twin_hull_eliminate_concave), (_twin_hull_to_path),
+	(twin_path_convex_hull):
+	Add convex hull algorithm from cairo sources.  Used to
+	constrain pens to convex shapes so that the convolution
+	algorithm works correctly.
+
+	* twin.h:
+	Reduce default tolerance to 1/16 of a pixel
+	
+	* twin_convolve.c: (_angle), (_twin_subpath_convolve),
+	(twin_path_convolve):
+	Use convex hull of pen.
+
+	* twin_font.c: (compare_snap), (_snap), (_add_snap),
+	(twin_path_glyph), (twin_glyph_width), (twin_path_string):
+	Snap horizontal and vertical elements of glyphs to
+	pixel boundaries.  Snap stem widths to integer amounts.
+	Add slanting and emboldening
+	
+	* twin_glyphs.c:
+	Add space and box
+	
+	* twin_primitive.c:
+	Avoid using __inline as it increases size dramatically
+	
+	* twin_spline.c: (_twin_spline_decompose):
+	Use <= tolerance_squared as that may be zero
+	
+	* xtwin.c: (main):
+	Swizzle code to show off recent changes
+
 2004-09-23  Keith Packard  <keithp at keithp.com>
 
  	* Makefile.am:

Index: Makefile.am
===================================================================
RCS file: /local/src/CVS/twin/Makefile.am,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- Makefile.am	24 Sep 2004 04:09:10 -0000	1.3
+++ Makefile.am	25 Sep 2004 01:10:00 -0000	1.4
@@ -20,6 +20,7 @@
 	twin_convolve.c \
 	twin_draw.c \
 	twin_glyphs.c \
+	twin_hull.c \
 	twin_font.c \
 	twin_geom.c \
 	twin_path.c \

Index: twin.h
===================================================================
RCS file: /local/src/CVS/twin/twin.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- twin.h	24 Sep 2004 04:09:10 -0000	1.4
+++ twin.h	25 Sep 2004 01:10:00 -0000	1.5
@@ -47,7 +47,7 @@
 
 #define TWIN_FIXED_ONE		(0x10)
 #define TWIN_FIXED_HALF		(0x08)
-#define TWIN_FIXED_TOLERANCE	(TWIN_FIXED_HALF)
+#define TWIN_FIXED_TOLERANCE	(1)
 
 #define TWIN_FALSE  0
 #define TWIN_TRUE   1
@@ -213,13 +213,25 @@
 twin_has_glyph (int glyph);
     
 void
-twin_path_glyph (twin_path_t *path, int glyph);
+twin_path_glyph (twin_path_t	*path, 
+		 twin_fixed_t	scale_x,
+		 twin_fixed_t	scale_y,
+		 int		style,
+		 int		glyph);
  
 int
-twin_glyph_width (int glyph);
+twin_glyph_width (int glyph, twin_fixed_t scale_x);
+
+#define TWIN_TEXT_ROMAN	    0
+#define TWIN_TEXT_BOLD	    1
+#define TWIN_TEXT_OBLIQUE   2
 
 void
-twin_path_string (twin_path_t *path, unsigned char *string);
+twin_path_string (twin_path_t	*path, 
+		  twin_fixed_t	scale_x,
+		  twin_fixed_t	scale_y,
+		  int		style,
+		  unsigned char *string);
 
 void
 twin_path_ucs4 (twin_path_t *path, twin_fixed_t scale_x,
@@ -230,6 +242,13 @@
 		const char *string);
 
 /*
+ * twin_hull.c
+ */
+
+twin_path_t *
+twin_path_convex_hull (twin_path_t *path);
+
+/*
  * twin_path.c
  */
 

Index: twin_convolve.c
===================================================================
RCS file: /local/src/CVS/twin/twin_convolve.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- twin_convolve.c	24 Sep 2004 04:09:10 -0000	1.3
+++ twin_convolve.c	25 Sep 2004 01:10:00 -0000	1.4
@@ -110,7 +110,6 @@
 #define F(x)	twin_fixed_to_double(x)
 #define DBGOUT(x...)	printf(x)
 
-#if 0
 static double
 _angle (twin_point_t *a, twin_point_t *b)
 {
@@ -121,7 +120,6 @@
     rad = atan2 ((double) dy, (double) dx);
     return rad * 180 / M_PI;
 }
-#endif
 #else
 #define DBGOUT(x...)
 #endif
@@ -190,12 +188,10 @@
 	     * step along pen (forwards or backwards) or stroke as appropriate
 	     */
 	     
-#if 0
 	    DBGOUT ("\tangles: stroke %9.4f +pen %9.4f -pen %9.4f\n",
 		    _angle (&sp[s], &sp[sn]),
 		    _angle (&pp[p], &pp[pn]),
 		    _angle (&pp[pm], &pp[p]));
-#endif
 	    if (_around_order (&sp[s],&sp[sn],&pp[p],&pp[pn]) > 0)
 	    {
 		DBGOUT ("+pen:   ");
@@ -261,6 +257,7 @@
 {
     int		p;
     int		s;
+    twin_path_t	*hull = twin_path_convex_hull (pen);
 
     p = 0;
     for (s = 0; s <= stroke->nsublen; s++)
@@ -281,8 +278,9 @@
 	    subpath.npoints = npoints;
 	    subpath.sublen = 0;
 	    subpath.nsublen = 0;
-	    _twin_subpath_convolve (path, &subpath, pen);
+	    _twin_subpath_convolve (path, &subpath, hull);
 	    p = sublen;
 	}
     }
+    twin_path_destroy (hull);
 }

Index: twin_font.c
===================================================================
RCS file: /local/src/CVS/twin/twin_font.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- twin_font.c	24 Sep 2004 04:09:10 -0000	1.1
+++ twin_font.c	25 Sep 2004 01:10:00 -0000	1.2
@@ -28,7 +28,9 @@
 
 #define F(x) twin_fixed_to_double(x)
 
-#define S(x) (twin_int_to_fixed (x) / 2)
+#define S(f,s)	((twin_fixed_t) ((((twin_dfixed_t) (f) * (s)) >> 5)))
+#define SX(x) (((x) * scale_x) >> 5)
+#define SY(y) (((y) * scale_y) >> 5)
 
 twin_bool_t
 twin_has_glyph (int glyph)
@@ -36,52 +38,216 @@
     return _twin_font[glyph] != NULL;
 }
 
+static int
+compare_snap (const void *av, const void *bv)
+{
+    const twin_gfixed_t   *a = av;
+    const twin_gfixed_t   *b = bv;
+
+    return (int) (*a - *b);
+}
+
+#define SNAPI(p)	(((p) + 0x7) & ~0xf)
+#define SNAPH(p)	(((p) + 0x3) & ~0x7)
+
+static twin_fixed_t
+_snap (twin_gfixed_t g, twin_fixed_t scale, twin_gfixed_t *snap, int nsnap)
+{
+    int		    s;
+    twin_fixed_t    v;
+
+    v = S(g, scale);
+    for (s = 0; s < nsnap - 1; s++)
+    {
+	if (snap[s] <= g && g <= snap[s+1])
+	{
+	    twin_fixed_t    before = S(snap[s],scale);
+	    twin_fixed_t    after = S(snap[s+1],scale);
+	    twin_fixed_t    dist = after - before;
+	    twin_fixed_t    snap_before = SNAPI(before);
+	    twin_fixed_t    snap_after = SNAPI(after);
+	    twin_fixed_t    move_before = snap_before - before;
+	    twin_fixed_t    move_after = snap_after - after;
+	    twin_fixed_t    dist_before = v - before;
+	    twin_fixed_t    dist_after = after - v;
+	    twin_fixed_t    move = ((twin_dfixed_t) dist_before * move_after + 
+				    (twin_dfixed_t) dist_after * move_before) / dist;
+#if 0
+	    printf ("%d <= %d <= %d\n", snap[s], g, snap[s+1]);
+	    printf ("%9.4f <= %9.4f <= %9.4f\n", F(before), F(v), F(after));
+	    printf ("before: %9.4f -> %9.4f\n", F(before), F(snap_before));
+	    printf ("after: %9.4f -> %9.4f\n", F(after), F(snap_after));
+	    printf ("v: %9.4f -> %9.4f\n", F(v), F(v+move));
+#endif
+	    v += move;
+	    break;
+	}
+    }
+#if 0
+    printf ("_snap: %d => %9.4f\n", g, F(v));
+#endif
+    return v;
+}
+
+#define SNAPX(p)	_snap (p, scale_x, snap_x, nsnap_x)
+#define SNAPY(p)	_snap (p, scale_y, snap_y, nsnap_y)
+
+static int
+_add_snap (twin_gfixed_t *snaps, int nsnap, twin_fixed_t snap)
+{
+    int s;
+
+    for (s = 0; s < nsnap; s++)
+	if (snaps[s] == snap)
+	    return nsnap;
+    snaps[nsnap++] = snap;
+    return nsnap;
+}
+
 void
-twin_path_glyph (twin_path_t *path, int glyph)
+twin_path_glyph (twin_path_t	*path, 
+		 twin_fixed_t	scale_x,
+		 twin_fixed_t	scale_y,
+		 int		style,
+		 int		glyph)
 {
     const twin_gpoint_t	*p = _twin_font[glyph];
     int			i;
     twin_fixed_t	xo, yo;
     twin_fixed_t	xc, yc;
+    twin_path_t		*stroke;
+    twin_path_t		*pen;
+    twin_fixed_t	pen_size;
+    twin_fixed_t	pen_adjust;
+    twin_gfixed_t    	*snap_x, *snap_y;
+    int			nsnap_x, nsnap_y;
+    int			npoints;
     
     if (!p)
 	return;
     
     twin_path_cur_point (path, &xo, &yo);
-    twin_path_close (path);
     
-    xc = xo - S (p[0].x);
-    yc = yo - S (16);
+    for (i = 1; p[i].y != -64; i++)
+	;
+
+    npoints = i - 1 + 3;
+    
+    snap_x = malloc ((npoints * 2) * sizeof (twin_gfixed_t));
+    snap_y = snap_x + npoints;
+    
+    nsnap_x = 0;
+    nsnap_y = 0;
+
+    /* snap left and right boundaries */
+    
+    nsnap_x = _add_snap (snap_x, nsnap_x, p[0].x);
+    nsnap_x = _add_snap (snap_x, nsnap_x, p[0].y);
+    
+    /* snap baseline, x height and cap height  */
+    nsnap_y = _add_snap (snap_y, nsnap_y, 9);
+    nsnap_y = _add_snap (snap_y, nsnap_y, -5);
+    nsnap_y = _add_snap (snap_y, nsnap_y, -12);
+    
+    /*
+     * Locate horizontal and vertical segments
+     */
+    for (i = 1; p[i].y != -64 && p[i+1].y != -64; i++)
+    {
+	if (p[i].x == -64 || p[i+1].x == -64)
+	    continue;
+	if (p[i].x == p[i+1].x)
+	    nsnap_x = _add_snap (snap_x, nsnap_x, p[i].x);
+	if (p[i].y == p[i+1].y)
+	    nsnap_y = _add_snap (snap_y, nsnap_y, p[i].y);
+    }
+
+    qsort (snap_x, nsnap_x, sizeof (twin_gfixed_t), compare_snap);
+    qsort (snap_y, nsnap_y, sizeof (twin_gfixed_t), compare_snap);
+    
+#if 0
+    printf ("snap_x:");
+    for (i = 0; i < nsnap_x; i++)
+	printf (" %d", snap_x[i]); 
+    printf ("\n");
+    
+    printf ("snap_y:");
+    for (i = 0; i < nsnap_y; i++)
+	printf (" %d", snap_y[i]); 
+    printf ("\n");
+#endif
+
+    stroke = twin_path_create ();
+    
+    /* snap pen size to half integer value */
+    if (style & TWIN_TEXT_BOLD)
+	pen_size = SNAPH(scale_y / 12);
+    else
+	pen_size = SNAPH(scale_y / 24);
+    
+    if (pen_size < TWIN_FIXED_HALF)
+	pen_size = TWIN_FIXED_HALF;
+    
+    pen_adjust = pen_size & TWIN_FIXED_HALF;
+    
+    pen = twin_path_create ();
+    twin_path_circle (pen, pen_size);
+
+    xc = SNAPI(xo - SX (p[0].x)) + pen_adjust;
+    yc = SNAPI(yo - SY (16)) + pen_adjust;
 
     for (i = 1; p[i].y != -64; i++)
 	if (p[i].x == -64)
-	    twin_path_close (path);
+	    twin_path_close (stroke);
 	else
-	    twin_path_draw (path, 
-			    xc + S (p[i].x),
-			    yc + S (p[i].y));
+	{
+	    twin_fixed_t    x = SNAPX(p[i].x);
+	    twin_fixed_t    y = SNAPY(p[i].y);
+	    
+	    if (style & TWIN_TEXT_OBLIQUE)
+		x -= y / 4;
+	    twin_path_draw (stroke, x + xc, y + yc);
+	}
 
-    xo = xo + twin_glyph_width (glyph);
+    twin_path_convolve (path, stroke, pen);
+    twin_path_destroy (stroke);
+    twin_path_destroy (pen);
+    
+    free (snap_x);
+
+    xo = xo + twin_glyph_width (glyph, scale_x);
     twin_path_move (path, xo, yo);
 }
 
 int
-twin_glyph_width (int glyph)
+twin_glyph_width (int glyph, twin_fixed_t scale_x)
 {
     const twin_gpoint_t	*p = _twin_font[glyph];
 
     if (!p)
 	return 0;
     
-    return twin_fixed_ceil (S (p[0].y) - S (p[0].x));
+    return twin_fixed_ceil (SX (p[0].y) - SX (p[0].x));
 }
 
 extern const uint16_t _twin_unicode[];
     
 void
-twin_path_string (twin_path_t *path, unsigned char *string)
+twin_path_string (twin_path_t	*path, 
+		  twin_fixed_t	scale_x,
+		  twin_fixed_t	scale_y,
+		  int		style,
+		  unsigned char *string)
 {
-    
+    unsigned char c;
+
+    while ((c = *string++))
+    {
+	uint16_t    g = _twin_unicode[c];
+
+	if (g)
+	    twin_path_glyph (path, scale_x, scale_y, style, g);
+    }
 }
 
 extern twin_font_t  twin_Bitstream_Vera_Sans_Roman;

Index: twin_glyphs.c
===================================================================
RCS file: /local/src/CVS/twin/twin_glyphs.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- twin_glyphs.c	24 Sep 2004 04:09:10 -0000	1.1
+++ twin_glyphs.c	25 Sep 2004 01:10:00 -0000	1.2
@@ -57166,8 +57166,23 @@
     { -64, -64 },
 };
 
+static const twin_gpoint_t g0000[] = {
+    { -9, 9 },
+    { -9, 9 },
+    { -9, 12 },
+    { 9, -12 },
+    { 9, 9 },
+    { -9, 9 },
+    { -64, -64 },
+};
+
+static const twin_gpoint_t g0500[] = {
+    { -4, 4 },
+    { -64, -64 },
+};
+
 const twin_gpoint_t    *_twin_font[] = {
-    0, g0001, g0002, g0003, g0004, g0005, g0006, g0007, 
+g0000, g0001, g0002, g0003, g0004, g0005, g0006, g0007, 
 g0008, g0009, g0010, g0011, g0012, g0013, g0014, g0015, 
 g0016, g0017, g0018, g0019, g0020, g0021, g0022, g0023, 
 g0024, g0025, g0026, g0027, g0028, g0029, g0030, g0031, 
@@ -57229,7 +57244,7 @@
     0,     0,     0,     0,     0,     0,     0,     0, 
     0,     0,     0,     0,     0,     0,     0,     0, 
     0,     0,     0,     0,     0,     0,     0,     0, 
-    0,     0,     0,     0,     0, g0501, g0502, g0503, 
+    0,     0,     0,     0, g0500, g0501, g0502, g0503, 
 g0504, g0505, g0506, g0507, g0508, g0509, g0510, g0511, 
 g0512, g0513, g0514, g0515, g0516, g0517, g0518, g0519, 
 g0520, g0521, g0522, g0523, g0524, g0525, g0526, g0527, 
@@ -57709,16 +57724,6 @@
 g4312, g4313, g4314, g4315, g4316, g4317, g4318, g4319, 
 g4320, g4321, g4322, g4323, g4324, g4325, g4326, };
 
-static const twin_gpoint_t g0000[] = {
-    { -9, 9 },
-    { -9, 9 },
-    { -9, 12 },
-    { 9, -12 },
-    { 9, 9 },
-    { -9, 9 },
-    { -64, -64 },
-};
-
 const uint16_t _twin_unicode[] = {
      000,  000,  000,  000,  000,  000,  000,  000,    /* 0x0000 */
      000,  000,  000,  000,  000,  000,  000,  000,
@@ -57726,7 +57731,7 @@
      000,  000,  000,  000,  000,  000,  000,  000,    /* 0x0010 */
      000,  000,  000,  000,  000,  000,  000,  000,
 
-     000,  000,  000,  000,  000,  000,  000,  000,    /* 0x0020 */
+     500,  000,  000,  000,  000,  000,  000,  000,    /* 0x0020 */
      000,  000,  000,  000,  000,  000,  000,  000,
 
      700,  701,  702,  703,  704,  705,  706,  707,    /* 0x0030 */

--- NEW FILE: twin_hull.c ---
(This appears to be a binary file; contents omitted.)

Index: twin_primitive.c
===================================================================
RCS file: /local/src/CVS/twin/twin_primitive.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- twin_primitive.c	15 Sep 2004 20:43:17 -0000	1.1.1.1
+++ twin_primitive.c	25 Sep 2004 01:10:01 -0000	1.2
@@ -24,6 +24,8 @@
 
 #include "twinint.h"
 
+#define __inline
+
 static twin_argb32_t __inline
 in_over (twin_argb32_t	dst,
 	 twin_argb32_t	src,

Index: twin_spline.c
===================================================================
RCS file: /local/src/CVS/twin/twin_spline.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- twin_spline.c	21 Sep 2004 15:42:57 -0000	1.1
+++ twin_spline.c	25 Sep 2004 01:10:01 -0000	1.2
@@ -89,7 +89,7 @@
 			twin_spline_t	*spline, 
 			twin_dfixed_t	tolerance_squared)
 {
-    if (_twin_spline_error_squared (spline) < tolerance_squared)
+    if (_twin_spline_error_squared (spline) <= tolerance_squared)
     {
 	twin_path_draw (path, spline->a.x, spline->a.y);
     }

Index: xtwin.c
===================================================================
RCS file: /local/src/CVS/twin/xtwin.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- xtwin.c	24 Sep 2004 04:09:11 -0000	1.4
+++ xtwin.c	25 Sep 2004 01:10:01 -0000	1.5
@@ -29,6 +29,13 @@
 
 #define D(x) twin_double_to_fixed(x)
 
+static int styles[] = {
+    TWIN_TEXT_ROMAN,
+    TWIN_TEXT_OBLIQUE,
+    TWIN_TEXT_BOLD,
+    TWIN_TEXT_BOLD|TWIN_TEXT_OBLIQUE
+};
+
 int
 main (int argc, char **argv)
 {
@@ -46,55 +53,35 @@
     int		    x, y;
     twin_fixed_t    fx, fy;
     int		    g;
+    int		    s;
 
     pen = twin_path_create ();
     twin_path_circle (pen, D (0.5));
-#define OFF TWIN_FIXED_HALF
-#if 0
-    twin_path_move (pen, D(-1), D(-1));
-    twin_path_draw (pen, D(1), D(-1));
-    twin_path_draw (pen, D(1), D(1));
-    twin_path_draw (pen, D(-1), D(1));
-#endif
     
     twin_fill (red, 0x00000000, TWIN_SOURCE, 0, 0, 512, 512);
     twin_fill (alpha, 0x00000000, TWIN_SOURCE, 0, 0, 512, 512);
 
     path = twin_path_create ();
-#if 0
-    stroke = twin_path_create();
-
-#define HEIGHT	twin_int_to_fixed(16)
-#define LEFT	(twin_int_to_fixed (3) + OFF)
-    
-    fx = LEFT;
-    fy = HEIGHT + OFF;
-    
-    twin_path_move (stroke, fx, fy);
-    
-    for (g = 0; g < 4000; g++)
-/*    for (g = 1000; g < 2000; g++) */
-/*    for (g = 2000; g < 2500; g++) */
-/*     for (g = 2500; g < 3000; g++) */
-/*    for (g = 3000; g < 4000; g++) */
-    /* really chunky looking */
-/*    for (g = 4000; g < 4327; g++) */
-/*  #define WIDTH	twin_int_to_fixed(60)
-    #define HEIGHT	twin_int_to_fixed(80)
- */
+#if 1
+    fx = D(3);
+    fy = D(8);
+    for (g = 10; g < 20; g++)
     {
-	if (twin_has_glyph (g))
+#if 1
+	for (s = 0; s < 4; s++)
 	{
-	    if (fx + twin_glyph_width (g) > twin_int_to_fixed (500))
-		twin_path_move (stroke, fx = LEFT, fy += HEIGHT);
-	    twin_path_glyph (stroke, g);
-	    fx += twin_glyph_width (g);
+	    twin_path_move (path, fx, fy);
+	    twin_path_string (path, D(g), D(g), styles[s],
+			      "the quick brown fox jumps over the lazy dog.");
+	    twin_path_string (path, D(g), D(g), styles[s], 
+			      "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG.");
+	    fy += D(g);
 	}
+#else
+	twin_path_string (path, D(g), D(g), "t");
+	fy += D(g);
+#endif
     }
-
-    twin_path_convolve (path, stroke, pen);
-
-    twin_path_destroy (stroke);
 #else
     fx = D(3);
     fy = D(8);
@@ -157,7 +144,7 @@
     twin_pixmap_move (red, 0, 0);
     twin_pixmap_move (blue, 100, 100);
     twin_pixmap_show (red, x11->screen, 0);
-    twin_pixmap_show (blue, x11->screen, 0);
+/*     twin_pixmap_show (blue, x11->screen, 0); */
     had_motion = TWIN_FALSE;
     for (;;)
     {




More information about the Commit mailing list