From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from localhost (fantadrom.bsd.lv [local]) by fantadrom.bsd.lv (OpenSMTPD) with ESMTPA id 7294ea3c for ; Mon, 13 Mar 2017 20:35:45 -0500 (EST) Date: Mon, 13 Mar 2017 20:35:45 -0500 (EST) Message-Id: <17441795295824448121.enqueue@fantadrom.bsd.lv> 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: Slightly increase widths calculated from string lengths (mainly X-Mailer: activitymail 1.26, http://search.cpan.org/dist/activitymail/ Content-Type: text/plain; charset=utf-8 Log Message: ----------- Slightly increase widths calculated from string lengths (mainly for .Bl -tag lists and SYNOPSIS .Nm blocks), such that the text still fits even if it is printed in bold font. This is an ugly band aid - but implementing font-dependent width measurements would be a major project and even more difficult for HTML than for PostScript. Issue reported by Jan Stary . Modified Files: -------------- mdocml: html.c mdoc_html.c Revision Data ------------- Index: html.c =================================================================== RCS file: /home/cvs/mdocml/mdocml/html.c,v retrieving revision 1.208 retrieving revision 1.209 diff -Lhtml.c -Lhtml.c -u -p -r1.208 -r1.209 --- html.c +++ html.c @@ -591,6 +591,8 @@ print_otag(struct html *h, enum htmltag break; su = &mysu; a2width(arg2, su); + /* Increase width to make even bold text fit. */ + su->scale *= 1.1; if (fmt[-1] == 'W') su->scale *= -1.0; break; Index: mdoc_html.c =================================================================== RCS file: /home/cvs/mdocml/mdocml/mdoc_html.c,v retrieving revision 1.275 retrieving revision 1.276 diff -Lmdoc_html.c -Lmdoc_html.c -u -p -r1.275 -r1.276 --- mdoc_html.c +++ mdoc_html.c @@ -628,7 +628,8 @@ mdoc_nm_pre(MDOC_ARGS) len = html_strlen(meta->name); t = print_otag(h, TAG_COLGROUP, ""); - print_otag(h, TAG_COL, "shw", len); + /* Increase width to make even bold text fit. */ + print_otag(h, TAG_COL, "shw", len + 2); print_otag(h, TAG_COL, ""); print_tagq(h, t); print_otag(h, TAG_TR, ""); -- To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv