From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from scc-mailout.scc.kit.edu (scc-mailout-webmail.scc.kit.edu [129.13.185.232]) by krisdoz.my.domain (8.14.3/8.14.3) with ESMTP id pACMf0n5006314 for ; Sat, 12 Nov 2011 17:41:02 -0500 (EST) Received: from hekate.usta.de (asta-nat.asta.uni-karlsruhe.de [172.22.63.82]) by scc-mailout-02.scc.kit.edu with esmtp (Exim 4.72 #1) id 1RPMFv-0002hO-2L; Sat, 12 Nov 2011 23:40:59 +0100 Received: from donnerwolke.usta.de ([172.24.96.3]) by hekate.usta.de with esmtp (Exim 4.72) (envelope-from ) id 1RPMFv-0003GP-0X for tech@mdocml.bsd.lv; Sat, 12 Nov 2011 23:40:59 +0100 Received: from iris.usta.de ([172.24.96.5] helo=usta.de) by donnerwolke.usta.de with esmtp (Exim 4.72) (envelope-from ) id 1RPMFu-0001UV-VJ for tech@mdocml.bsd.lv; Sat, 12 Nov 2011 23:40:58 +0100 Received: from schwarze by usta.de with local (Exim 4.72) (envelope-from ) id 1RPMFu-0008Rk-ND for tech@mdocml.bsd.lv; Sat, 12 Nov 2011 23:40:58 +0100 Date: Sat, 12 Nov 2011 23:40:58 +0100 From: Ingo Schwarze To: tech@mdocml.bsd.lv Subject: Re: mdocml: Accomodate for \f(Cx formatting. Message-ID: <20111112224058.GA16229@iris.usta.de> References: <201111061443.pA6EhE7Q011223@krisdoz.my.domain> X-Mailinglist: mdocml-tech Reply-To: tech@mdocml.bsd.lv MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201111061443.pA6EhE7Q011223@krisdoz.my.domain> User-Agent: Mutt/1.5.21 (2010-09-15) Hi, the meaning of the "C*" font family is not "constant width" in general. Even in groff, its meaning is output-device dependent, and only a few devices support it: mainly -Tps and -Thtml, but not -Tascii or -Tdvi. Even in groff -Tps, its meaning isn't "constant width", but rather "Adobe Courier". There are many other -Tps families we do not support (A, BM, H, HN, N, P, T). Even when aiming for groff -Tps C* support only, this patch is incomplete, \f[CBI] is missing. Hence, i mildly disagree with this patch - but merged it anyway because it doesn't do that much harm. I do think, however, that any font escape except \fR \fI \fB \f1 \f2 \f3 \fP merits a warning that it's utterly non-portable both regarding different roff implementations and even regarding different output devices. I don't consider this an urgent matter at all, but thought i'd bring this up in case anybody has more thoughts on the subject... Yours, Ingo kristaps@mdocml.bsd.lv wrote on Sun, Nov 06, 2011 at 09:43:14AM -0500: > Log Message: > ----------- > Accomodate for \f(Cx formatting. Noted by Andreas Vogele, thanks! > > Modified Files: > -------------- > mdocml: > mandoc.c > roff.7 > > Revision Data > ------------- > Index: mandoc.c > =================================================================== > RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/mandoc.c,v > retrieving revision 1.60 > retrieving revision 1.61 > diff -Lmandoc.c -Lmandoc.c -u -p -r1.60 -r1.61 > --- mandoc.c > +++ mandoc.c > @@ -369,8 +369,15 @@ out: > > switch (gly) { > case (ESCAPE_FONT): > - if (1 != rlim) > + /* > + * Pretend that the constant-width font modes are the > + * same as the regular font modes. > + */ > + if (2 == rlim && 'C' == *rstart) > + rstart++; > + else if (1 != rlim) > break; > + > switch (*rstart) { > case ('3'): > /* FALLTHROUGH */ > Index: roff.7 > =================================================================== > RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/roff.7,v > retrieving revision 1.33 > retrieving revision 1.34 > diff -Lroff.7 -Lroff.7 -u -p -r1.33 -r1.34 > --- roff.7 > +++ roff.7 > @@ -143,6 +143,8 @@ escape followed by an indicator: B (bold > (revert to previous mode). > A numerical representation 3, 2, or 1 (bold, italic, and regular, > respectively) may be used instead. > +The indicator or numerical representative may be preceded by C > +(constant-width), which is ignored. > .Pp > Examples: > .Bl -tag -width Ds -offset indent -compact -- To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv