Index: ttf2lht/drv_poly.c =================================================================== --- ttf2lht/drv_poly.c (revision 18955) +++ ttf2lht/drv_poly.c (revision 18956) @@ -61,11 +61,15 @@ void stroke_poly_init(stroke_t *s_) { + poly_stroke_t *s = (poly_stroke_t *)s_; + drv_approx_comment = NULL; printf("li:pcb-rnd-font-v1 {\n"); printf(" ha:geda_pcb {\n"); printf(" id = 0\n"); printf(" ha:symbols {\n"); + + s->maxx = s->maxy = 0; } static void emit(pcb_pline_t *pl, void *user_data) @@ -77,7 +81,12 @@ printf(" li:simplepoly.%d {\n", s->spid++); n = pl->Count; for(i = 0, v = &pl->head; i < n; v = v->next, i++) { - printf(" %fmil; %fmil\n", OTX(&s->s, v->point[0]), OTY(&s->s, v->point[1])); + double x = OTX(&s->s, v->point[0]), y = OTY(&s->s, v->point[1]); + if (x > s->maxx) + s->maxx = x; + if (y > s->maxy) + s->maxy = y; + printf(" %fmil; %fmil\n", x, y); } printf(" }\n"); } @@ -128,7 +137,11 @@ void stroke_poly_uninit(stroke_t *s_) { + poly_stroke_t *s = (poly_stroke_t *)s_; + printf(" }\n"); + printf(" cell_width = %fmil\n", s->maxx); + printf(" cell_height = %fmil\n", s->maxy); printf(" }\n"); printf("}\n"); #warning TODO: free fields Index: ttf2lht/drv_poly.h =================================================================== --- ttf2lht/drv_poly.h (revision 18955) +++ ttf2lht/drv_poly.h (revision 18956) @@ -14,6 +14,7 @@ pcb_polyarea_t *pa; int spid; + double maxx, maxy; } poly_stroke_t; extern poly_stroke_t poly_stroke;