Index: ttf2lht/Makefile =================================================================== --- ttf2lht/Makefile (revision 18923) +++ ttf2lht/Makefile (revision 18924) @@ -1,4 +1,4 @@ CFLAGS = -Wall -g -I/usr/include/freetype2 -LDFLAGS = -lfreetype -lm +LDFLAGS = -lfreetype ttf2lht: ttf2lht.c Index: ttf2lht/ttf2lht.c =================================================================== --- ttf2lht/ttf2lht.c (revision 18923) +++ ttf2lht/ttf2lht.c (revision 18924) @@ -1,5 +1,4 @@ #include -#include #include #include #include @@ -18,6 +17,11 @@ FT_Outline_Funcs *funcs; } stroke_t; +static double sqr(double a) +{ + return a*a; +} + int stroke_move_to(const FT_Vector *to, void *s_) { stroke_t *s = (stroke_t *)s_; @@ -41,8 +45,8 @@ printf("## conic to {\n"); for(t = 0.0; t <= 1.0; t += td) { - v.x = pow(1.0-t, 2) * s->x + 2*t*(1.0-t)*control->x + t*t*to->x; - v.y = pow(1.0-t, 2) * s->y + 2*t*(1.0-t)*control->y + t*t*to->y; + v.x = sqr(1.0-t) * s->x + 2*t*(1.0-t)*control->x + t*t*to->x; + v.y = sqr(1.0-t) * s->y + 2*t*(1.0-t)*control->y + t*t*to->y; s->funcs->line_to(&v, s); } printf("## }\n");