9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] troff to postscript with New Century Schoolbook: discrepancies?
@ 2008-12-07 18:04 Pietro Gagliardi
  2008-12-07 18:45 ` Russ Cox
  0 siblings, 1 reply; 2+ messages in thread
From: Pietro Gagliardi @ 2008-12-07 18:04 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

New Century Schoolbook is a font included in Plan 9. The troff fonts
are NR, NI, NB, NX. -ms has a .FP option "century."

% cat file
\f(NRHello ― world!
% troff file | page
converting from troff to postscript...
reading through postscript...					― works
% cat file2
.FP century
Hello ― world!
% troff -ms file2 | page
converting from troff to postscript...
/386/bin/aux/tr2post: <stdin>:41 :WARNING: cannot find glyph,
rune=0x2014 stoken=<―> troff font NR
reading through postscript...					pjw instead of ―

Why?

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (Darwin)

iEYEARECAAYFAkk8EDgACgkQuv7AVNQDs+xuZQCeKR+Ra4y5bvkYM6VdWPjWBilQ
jCkAoIj1z4RtmwZ11pUq5ZKOBi0+KZ2c
=E4fj
-----END PGP SIGNATURE-----



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [9fans] troff to postscript with New Century Schoolbook: discrepancies?
  2008-12-07 18:04 [9fans] troff to postscript with New Century Schoolbook: discrepancies? Pietro Gagliardi
@ 2008-12-07 18:45 ` Russ Cox
  0 siblings, 0 replies; 2+ messages in thread
From: Russ Cox @ 2008-12-07 18:45 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

>  New Century Schoolbook is a font included in Plan 9.

Included in Plan 9, no.  Known to troff, yes.
When you view a file with this font using page,
what displays on the screen is the Ghostscript
pseudo-equivalent (URW)++ Century Schoolbook L.

> [Why does \f(NR― work while
> .fp 1 NR
> ―
> does not?]

In both cases, the NR font does not have an em dash.
Lucky for you, troff assumes that characters it doesn't
know about have width 1em and passes them through.
\f(NR temporarily mounts NR as font 0 and uses font 0,
while .fp 1 NR mounts NR as font 1.  In the former case,
font 1 is still R; in the latter, it is not.  If tr2post cannot
find a character in the current font, it tries font 1, so that
for example if there isn't an italic dash in font 2, it will
fall back to the roman dash in font 1.  The difference is
that in the first case, font 1 is still a font with a dash.

Russ

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-12-07 18:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-12-07 18:04 [9fans] troff to postscript with New Century Schoolbook: discrepancies? Pietro Gagliardi
2008-12-07 18:45 ` Russ Cox

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).