Index: work/util/ttf2lht/Makefile =================================================================== --- work/util/ttf2lht/Makefile (revision 18931) +++ work/util/ttf2lht/Makefile (revision 18932) @@ -6,7 +6,7 @@ LDFLAGS = -lfreetype -lm -ttf2lht: ttf2lht.o drv_anim.o drv_approx.o compat_dummy.o $(RNDLIB) +ttf2lht: ttf2lht.o drv_anim.o drv_poly.o drv_approx.o compat_dummy.o $(RNDLIB) $(RND): cd $(RNDLIB) && make Index: work/util/ttf2lht/drv_poly.c =================================================================== --- work/util/ttf2lht/drv_poly.c (nonexistent) +++ work/util/ttf2lht/drv_poly.c (revision 18932) @@ -0,0 +1,42 @@ +#include "ttf2lht.h" +#include "drv_poly.h" +#include "drv_approx.h" + +static int stroke_poly_move_to(const FT_Vector *to, void *s_) +{ + poly_stroke_t *s = (poly_stroke_t *)s_; + s->s.x = to->x; + s->s.y = to->y; + return 0; +} + +static int stroke_poly_line_to(const FT_Vector *to, void *s_) +{ + poly_stroke_t *s = (poly_stroke_t *)s_; + /*printf("line %f %f %ld %ld\n", s->s.x, s->s.y, to->x, to->y);*/ + s->s.x = to->x; + s->s.y = to->y; + return 0; +} + +void stroke_poly_init(stroke_t *s) +{ +} + +void stroke_poly_uninit(stroke_t *s) +{ +} + +poly_stroke_t poly_stroke = { + { + { + stroke_poly_move_to, + stroke_poly_line_to, + stroke_approx_conic_to, + stroke_approx_cubic_to, + 0, 0 + }, + stroke_poly_init, + stroke_poly_uninit, + } +}; Index: work/util/ttf2lht/drv_poly.h =================================================================== --- work/util/ttf2lht/drv_poly.h (nonexistent) +++ work/util/ttf2lht/drv_poly.h (revision 18932) @@ -0,0 +1,7 @@ +typedef struct { + stroke_t s; +} poly_stroke_t; + +extern poly_stroke_t poly_stroke; + + Index: work/util/ttf2lht/ttf2lht.c =================================================================== --- work/util/ttf2lht/ttf2lht.c (revision 18931) +++ work/util/ttf2lht/ttf2lht.c (revision 18932) @@ -7,6 +7,7 @@ #include "ttf2lht.h" #include "drv_anim.h" +#include "drv_poly.h" FT_Library library; FT_Face face; @@ -49,7 +50,7 @@ FT_Error errnum; FT_ULong chr; FT_UInt idx; - stroke_t *stroker = (stroke_t *)&anim_stroke; + stroke_t *stroker = (stroke_t *)&poly_stroke; # undef __FTERRORS_H__ # define FT_ERRORDEF( e, v, s ) { e, s },