From: Ingo Schwarze <schwarze@usta.de>
To: tech@mdocml.bsd.lv
Subject: Re: mdocml: Accomodate for \f(Cx formatting.
Date: Sat, 12 Nov 2011 23:40:58 +0100 [thread overview]
Message-ID: <20111112224058.GA16229@iris.usta.de> (raw)
In-Reply-To: <201111061443.pA6EhE7Q011223@krisdoz.my.domain>
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
next parent reply other threads:[~2011-11-12 22:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <201111061443.pA6EhE7Q011223@krisdoz.my.domain>
2011-11-12 22:40 ` Ingo Schwarze [this message]
2011-11-13 0:14 ` Kristaps Dzonsons
2011-11-14 16:11 ` Ingo Schwarze
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20111112224058.GA16229@iris.usta.de \
--to=schwarze@usta.de \
--cc=tech@mdocml.bsd.lv \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).