From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from krisdoz.my.domain (kristaps@localhost [127.0.0.1]) by krisdoz.my.domain (8.14.3/8.14.3) with ESMTP id o6KAu4CP014099 for ; Tue, 20 Jul 2010 06:56:04 -0400 (EDT) Received: (from kristaps@localhost) by krisdoz.my.domain (8.14.3/8.14.3/Submit) id o6KAu46t016304; Tue, 20 Jul 2010 06:56:04 -0400 (EDT) Date: Tue, 20 Jul 2010 06:56:04 -0400 (EDT) Message-Id: <201007201056.o6KAu46t016304@krisdoz.my.domain> X-Mailinglist: mdocml-source Reply-To: source@mdocml.bsd.lv MIME-Version: 1.0 From: kristaps@mdocml.bsd.lv To: source@mdocml.bsd.lv Subject: mdocml: Use floating-point -Tps "moveto" arguments to smooth out column X-Mailer: activitymail 1.26, http://search.cpan.org/dist/activitymail/ Content-Type: text/plain; charset=utf-8 Log Message: ----------- Use floating-point -Tps "moveto" arguments to smooth out column and row misalignments. Modified Files: -------------- mdocml: term_ps.c Revision Data ------------- Index: term_ps.c =================================================================== RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/term_ps.c,v retrieving revision 1.34 retrieving revision 1.35 diff -Lterm_ps.c -Lterm_ps.c -u -p -r1.34 -r1.35 --- term_ps.c +++ term_ps.c @@ -39,7 +39,7 @@ /* Convert an AFM unit "x" to a PostScript points */ #define AFM2PNT(p, x) /* LINTED */ \ - (size_t)((double)(x) / (1000.0 / (double)(p)->engine.ps.scale)) + ((double)(x) / (1000.0 / (double)(p)->engine.ps.scale)) struct glyph { size_t wx; /* WX in AFM */ @@ -635,8 +635,8 @@ ps_begin(struct termp *p) printf("%%%%Pages: (atend)\n"); printf("%%%%PageOrder: Ascend\n"); printf("%%%%DocumentMedia: Default %zu %zu 0 () ()\n", - AFM2PNT(p, p->engine.ps.width), - AFM2PNT(p, p->engine.ps.height)); + (size_t)AFM2PNT(p, p->engine.ps.width), + (size_t)AFM2PNT(p, p->engine.ps.height)); printf("%%%%DocumentNeededResources: font"); for (i = 0; i < (int)TERMFONT__MAX; i++) printf(" %s", fonts[i].name); @@ -675,7 +675,7 @@ ps_pletter(struct termp *p, int c) */ if ( ! (PS_INLINE & p->engine.ps.flags)) { - ps_printf(p, "%zu %zu moveto\n(", + ps_printf(p, "%.3f %.3f moveto\n(", AFM2PNT(p, p->engine.ps.pscol), AFM2PNT(p, p->engine.ps.psrow)); p->engine.ps.flags |= PS_INLINE; -- To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv