summaryrefslogtreecommitdiff
path: root/usr.bin/mandoc/mdoc_html.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2017-03-14 01:34:58 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2017-03-14 01:34:58 +0000
commit6da01ba9da87cf878a2df49b0360a385d1e24586 (patch)
treee5137c765c3ef0a97adcd4bcee49766b07b4618a /usr.bin/mandoc/mdoc_html.c
parentb757c3dfcbaafcd1d4354187663b2199199fc338 (diff)
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 <hans at stare dot cz>.
Diffstat (limited to 'usr.bin/mandoc/mdoc_html.c')
-rw-r--r--usr.bin/mandoc/mdoc_html.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/mandoc/mdoc_html.c b/usr.bin/mandoc/mdoc_html.c
index ed55a42c65a..d25686ff906 100644
--- a/usr.bin/mandoc/mdoc_html.c
+++ b/usr.bin/mandoc/mdoc_html.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mdoc_html.c,v 1.150 2017/03/13 20:22:11 schwarze Exp $ */
+/* $OpenBSD: mdoc_html.c,v 1.151 2017/03/14 01:34:57 schwarze Exp $ */
/*
* Copyright (c) 2008-2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2014, 2015, 2016, 2017 Ingo Schwarze <schwarze@openbsd.org>
@@ -626,7 +626,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, "");