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 /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 'html.c')
-rw-r--r-- | html.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1,4 +1,4 @@ -/* $Id: html.c,v 1.208 2017/03/13 19:01:38 schwarze Exp $ */ +/* $Id: html.c,v 1.209 2017/03/14 01:35:15 schwarze Exp $ */ /* * Copyright (c) 2008-2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2011-2015, 2017 Ingo Schwarze <schwarze@openbsd.org> @@ -591,6 +591,8 @@ print_otag(struct html *h, enum htmltag tag, const char *fmt, ...) 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; |