summaryrefslogtreecommitdiffstats
path: root/usr.bin/mandoc/html.c
diff options
context:
space:
mode:
authorschwarze <schwarze@openbsd.org>2017-05-12 17:56:39 +0000
committerschwarze <schwarze@openbsd.org>2017-05-12 17:56:39 +0000
commit25934d7bd43dc6cdf5bdd8f0894e3cac08d24f73 (patch)
tree773bb603a233e6550da9579515fb8e8f41ff28fa /usr.bin/mandoc/html.c
parentFix the man.cgi target after the recent file additions; (diff)
downloadwireguard-openbsd-25934d7bd43dc6cdf5bdd8f0894e3cac08d24f73.tar.xz
wireguard-openbsd-25934d7bd43dc6cdf5bdd8f0894e3cac08d24f73.zip
Make the tag column in .Bl -tag lists wider:
1. I forgot about the 2n padding between tag and body. 2. The factor 1.1 was too small for bold fold, make it *1.15 + 1n. Ugliness spotted by tb@.
Diffstat (limited to 'usr.bin/mandoc/html.c')
-rw-r--r--usr.bin/mandoc/html.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/usr.bin/mandoc/html.c b/usr.bin/mandoc/html.c
index 323888d3520..1f4286f66d4 100644
--- a/usr.bin/mandoc/html.c
+++ b/usr.bin/mandoc/html.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: html.c,v 1.80 2017/03/15 11:29:50 schwarze Exp $ */
+/* $OpenBSD: html.c,v 1.81 2017/05/12 17:56:39 schwarze Exp $ */
/*
* Copyright (c) 2008-2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2011-2015, 2017 Ingo Schwarze <schwarze@openbsd.org>
@@ -607,15 +607,21 @@ print_otag(struct html *h, enum htmltag tag, const char *fmt, ...)
SCALE_VS_INIT(su, i);
break;
case 'w':
- case 'W':
if ((arg2 = va_arg(ap, char *)) == NULL)
break;
su = &mysu;
a2width(arg2, su);
- /* Increase width to make even bold text fit. */
- su->scale *= 1.1;
- if (fmt[-1] == 'W')
+ if (*fmt == '+') {
+ /* Increase to make even bold text fit. */
+ su->scale *= 1.15;
+ /* Add padding. */
+ su->scale += 3.0;
+ fmt++;
+ }
+ if (*fmt == '-') {
su->scale *= -1.0;
+ fmt++;
+ }
break;
default:
abort();