From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from krisdoz.my.domain (schwarze@localhost [127.0.0.1]) by krisdoz.my.domain (8.14.5/8.14.5) with ESMTP id s9DM0mVf025729 for ; Mon, 13 Oct 2014 18:00:48 -0400 (EDT) Received: (from schwarze@localhost) by krisdoz.my.domain (8.14.5/8.14.3/Submit) id s9DM0loC018653; Mon, 13 Oct 2014 18:00:47 -0400 (EDT) Date: Mon, 13 Oct 2014 18:00:47 -0400 (EDT) Message-Id: <201410132200.s9DM0loC018653@krisdoz.my.domain> X-Mailinglist: mdocml-source Reply-To: source@mdocml.bsd.lv MIME-Version: 1.0 From: schwarze@mdocml.bsd.lv To: source@mdocml.bsd.lv Subject: mdocml: Properly scale string length measurements for PostScript and PDF X-Mailer: activitymail 1.26, http://search.cpan.org/dist/activitymail/ Content-Type: text/plain; charset=utf-8 Log Message: ----------- Properly scale string length measurements for PostScript and PDF output; this doesn't change anything for ASCII and UTF-8. Problem reported by bentley@. Modified Files: -------------- mdocml: mdoc_term.c Revision Data ------------- Index: mdoc_term.c =================================================================== RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/mdoc_term.c,v retrieving revision 1.282 retrieving revision 1.283 diff -Lmdoc_term.c -Lmdoc_term.c -u -p -r1.282 -r1.283 --- mdoc_term.c +++ mdoc_term.c @@ -541,8 +541,10 @@ a2width(const struct termp *p, const cha struct roffsu su; assert(v); - if ( ! a2roffsu(v, &su, SCALE_MAX)) + if ( ! a2roffsu(v, &su, SCALE_MAX)) { SCALE_HS_INIT(&su, term_strlen(p, v)); + su.scale /= term_strlen(p, "0"); + } return(term_hspan(p, &su)); } @@ -560,8 +562,10 @@ a2offs(const struct termp *p, const char return(term_len(p, p->defindent + 1)); else if (0 == strcmp(v, "indent-two")) return(term_len(p, (p->defindent + 1) * 2)); - else if ( ! a2roffsu(v, &su, SCALE_MAX)) + else if ( ! a2roffsu(v, &su, SCALE_MAX)) { SCALE_HS_INIT(&su, term_strlen(p, v)); + su.scale /= term_strlen(p, "0"); + } return(term_hspan(p, &su)); } -- To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv