diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2017-03-14 01:35:15 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2017-03-14 01:35:15 +0000 |
commit | 2c9e399563f0727410bbcdf0e023f956634dccf4 (patch) | |
tree | 616813cc38823ea9afcc81d717b4ec1db99dfaa9 /mdoc_html.c | |
parent | fdef5d4fb1211d315d1cd83791f29f4c0935511c (diff) | |
download | mandoc-2c9e399563f0727410bbcdf0e023f956634dccf4.tar.gz mandoc-2c9e399563f0727410bbcdf0e023f956634dccf4.tar.zst mandoc-2c9e399563f0727410bbcdf0e023f956634dccf4.zip |
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 'mdoc_html.c')
-rw-r--r-- | mdoc_html.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/mdoc_html.c b/mdoc_html.c index 07583538..8a0eb8dc 100644 --- a/mdoc_html.c +++ b/mdoc_html.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_html.c,v 1.275 2017/03/13 20:22:18 schwarze Exp $ */ +/* $Id: mdoc_html.c,v 1.276 2017/03/14 01:35:15 schwarze Exp $ */ /* * Copyright (c) 2008-2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2014, 2015, 2016, 2017 Ingo Schwarze <schwarze@openbsd.org> @@ -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, ""); |