Index: ttf.c =================================================================== --- ttf.c (revision 32814) +++ ttf.c (revision 32815) @@ -64,7 +64,7 @@ } #define TRX(x) RND_MM_TO_COORD((x) * str->scale_x + str->dx) -#define TRY(y) RND_MM_TO_COORD((y) * str->scale_y + str->dy) +#define TRY(y) RND_MM_TO_COORD((str->ttf->face->height - (y) - str->ttf->face->ascender - str->ttf->face->descender) * str->scale_y + str->dy) static int str_move_to(const FT_Vector *to, void *s_) { @@ -117,6 +117,7 @@ stroke.scale_x = stroke.scale_y = 0.001; stroke.sym = &f->Symbol['A']; + stroke.ttf = &ctx; pcb_font_free_symbol(stroke.sym); Index: ttf_load.h =================================================================== --- ttf_load.h (revision 32814) +++ ttf_load.h (revision 32815) @@ -52,6 +52,7 @@ double x, y; /* in freeftype's coords */ double dx, dy, scale_x, scale_y; pcb_symbol_t *sym; + pcb_ttf_t *ttf; }; /* Load the ttf font from fn; return 0 on success */