Index: fidocadj.c =================================================================== --- fidocadj.c (revision 7178) +++ fidocadj.c (revision 7179) @@ -238,24 +238,36 @@ PCB_TEXT_LOOP(ly) { char *s; - pcb_coord_t x0 = text->X, sx = text->BoundingBox.X2 - text->BoundingBox.X1; - pcb_coord_t y0 = text->Y, sy = text->BoundingBox.Y2 - text->BoundingBox.Y1; - switch(text->Direction) { + /* default_font 'm' = 4189 wide + * default_font 'l', starts at y = 1000 + * default_font 'p','q', finish at y = 6333 + * default_font stroke thickness = 800 + * giving sx = (4189+800)/(5333+800) ~= 0.813 + */ + pcb_coord_t x0 = text->X; + pcb_coord_t sx = text->BoundingBox.X2 - text->BoundingBox.X1; + pcb_coord_t y0 = text->Y; + pcb_coord_t sy = text->BoundingBox.Y2 - text->BoundingBox.Y1; + pcb_coord_t glyphy = 5789*(text->Scale); /* (ascent+descent)*Scale */ + pcb_coord_t glyphx = 813*(glyphy/1000); /* based on 'm' glyph dimensions */ + glyphy = 10*glyphy/7; /* empirically determined */ + glyphx = 10*glyphx/7; /* scaling voodoo */ + /*switch(text->Direction) { case 0: - /*x0 += sx;*/ + x0 += sx; break; case 1: - /*y0 += sy;*/ + y0 += sy; break; case 2: - /*x0 -= sx;*/ + x0 -= sx; break; case 3: - /*y0 -= sy;*/ + y0 -= sy; break; - } + }*/ fprintf(f, "TY %ld %ld %ld %ld %d 1 %d * ", /* 1 = bold */ - crd(x0), crd(y0), 2*crd(sy)/5, 2*crd(sx)/5, /* scaling voodoo */ + crd(x0), crd(y0), crd(glyphy), crd(glyphx), 90*(text->Direction), fidoly); for(s = text->TextString; *s != '\0'; s++) { if (*s == ' ')