diff options
Diffstat (limited to 'html.c')
-rw-r--r-- | html.c | 30 |
1 files changed, 17 insertions, 13 deletions
@@ -624,24 +624,28 @@ print_otag(struct html *h, enum htmltag tag, const char *fmt, ...) su = va_arg(ap, struct roffsu *); break; case 'w': - if ((arg2 = va_arg(ap, char *)) == NULL) { - if (*fmt == '+') - fmt++; - if (*fmt == '-') - fmt++; - break; + if ((arg2 = va_arg(ap, char *)) != NULL) { + su = &mysu; + a2width(arg2, su); + } + if (*fmt == '*') { + if (su != NULL && su->unit == SCALE_EN && + su->scale > 5.9 && su->scale < 6.1) + su = NULL; + fmt++; } - su = &mysu; - a2width(arg2, su); if (*fmt == '+') { - /* Increase to make even bold text fit. */ - su->scale *= 1.2; - /* Add padding. */ - su->scale += 3.0; + if (su != NULL) { + /* Make even bold text fit. */ + su->scale *= 1.2; + /* Add padding. */ + su->scale += 3.0; + } fmt++; } if (*fmt == '-') { - su->scale *= -1.0; + if (su != NULL) + su->scale *= -1.0; fmt++; } break; |