From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from scc-mailout-kit-01.scc.kit.edu (scc-mailout-kit-01.scc.kit.edu [129.13.231.81]) by fantadrom.bsd.lv (OpenSMTPD) with ESMTP id dd2e216e for ; Mon, 13 Mar 2017 20:49:47 -0500 (EST) Received: from asta-nat.asta.uni-karlsruhe.de ([172.22.63.82] helo=hekate.usta.de) by scc-mailout-kit-01.scc.kit.edu with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (envelope-from ) id 1cnbar-00011Z-Hm; Tue, 14 Mar 2017 02:49:46 +0100 Received: from donnerwolke.usta.de ([172.24.96.3]) by hekate.usta.de with esmtp (Exim 4.77) (envelope-from ) id 1cnbaq-0007Gv-UJ; Tue, 14 Mar 2017 02:49:44 +0100 Received: from athene.usta.de ([172.24.96.10]) by donnerwolke.usta.de with esmtp (Exim 4.84_2) (envelope-from ) id 1cnbap-0006KL-NU; Tue, 14 Mar 2017 02:49:44 +0100 Received: from localhost (athene.usta.de [local]) by athene.usta.de (OpenSMTPD) with ESMTPA id 20e0d8f6; Tue, 14 Mar 2017 02:49:43 +0100 (CET) Date: Tue, 14 Mar 2017 02:49:43 +0100 From: Ingo Schwarze To: Jan Stary Cc: discuss@mdocml.bsd.lv Subject: Re: Links into HTML page would be great Message-ID: <20170314014943.GB18242@athene.usta.de> References: <8ffc686a-f898-4952-ae6f-3b8881469f17@thomas-guettler.de> <20170312180832.GE69791@athene.usta.de> <20170312193940.GA91520@athene.usta.de> <0dbf9b44-499d-dabc-f759-17c5a0f2f6da@thomas-guettler.de> <20170313095627.GA97043@www.stare.cz> X-Mailinglist: mdocml-discuss Reply-To: discuss@mdocml.bsd.lv MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170313095627.GA97043@www.stare.cz> User-Agent: Mutt/1.6.2 (2016-07-01) Hi Jan, Jan Stary wrote on Mon, Mar 13, 2017 at 10:56:27AM +0100: > Anyway, in my firefox, > http://man.openbsd.org/OpenBSD-current/man5/ssh_config.5 > displays the synopsis as > > SYNOPSIS > ~/.ssh > /config > > /etc/ssh > /ssh_config > > > Only after I make the font smaller than 100% (with Crtrl + -) it becomes > > SYNOPSIS > ~/.ssh/config > /etc/ssh/ssh_config > > Why is that? Could it be besause of the hardwired width? Yes. > (Or is it a firefox bug to not recompute the relative widths (ex)?) No, it is a bug in mandoc, not in firefox. >

SYNOPSIS

> > > At this point, we still have "font-weight: normal;". So the column width is (about) 13 normal-weight characters. > > > > But here, we print 13 bold characters. They don't fit and get wrapped. > In lynx it displays fine. Yes, the above is generally no problem width fixed-width fonts. In mandoc -Tascii and mandoc -Tutf8, it also works fine. Similar issues might exist in PostScript and PDF, but i'll treat that as a different story for now. Thanks for mentioning this, Ingo Log Message: ----------- 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 . Modified Files: -------------- mdocml: html.c mdoc_html.c Revision Data ------------- Index: html.c =================================================================== RCS file: /home/cvs/mdocml/mdocml/html.c,v retrieving revision 1.208 retrieving revision 1.209 diff -Lhtml.c -Lhtml.c -u -p -r1.208 -r1.209 --- html.c +++ html.c @@ -591,6 +591,8 @@ print_otag(struct html *h, enum htmltag 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; Index: mdoc_html.c =================================================================== RCS file: /home/cvs/mdocml/mdocml/mdoc_html.c,v retrieving revision 1.275 retrieving revision 1.276 diff -Lmdoc_html.c -Lmdoc_html.c -u -p -r1.275 -r1.276 --- mdoc_html.c +++ mdoc_html.c @@ -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, ""); -- To unsubscribe send an email to discuss+unsubscribe@mdocml.bsd.lv
~/.ssh/config