9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] plan9port troff - \(sq character
@ 2025-08-11 14:35 arnold
  2025-08-11 18:36 ` tlaronde
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: arnold @ 2025-08-11 14:35 UTC (permalink / raw)
  To: 9fans

Hi.  I'm using plan9port troff to try to reconstitute a book
from the early 1980s.  The \(sq character in groff (and in
the original book) came out as small square.

In plan9 troff I'm getting an upside-down exclamation point.
Any idea why?  How can I get \(sq to give me a square?

Much thanks,

Arnold

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T87428730dcc006b0-M16b15ed1d7a90da26daf9de1
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

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

* Re: [9fans] plan9port troff - \(sq character
  2025-08-11 14:35 [9fans] plan9port troff - \(sq character arnold
@ 2025-08-11 18:36 ` tlaronde
  2025-08-11 19:30   ` arnold
  2025-08-11 18:57 ` arnold
  2025-08-11 19:23 ` LdBeth
  2 siblings, 1 reply; 8+ messages in thread
From: tlaronde @ 2025-08-11 18:36 UTC (permalink / raw)
  To: 9fans

On Mon, Aug 11, 2025 at 05:35:13PM +0300, arnold@skeeve.com wrote:
> Hi.  I'm using plan9port troff to try to reconstitute a book
> from the early 1980s.  The \(sq character in groff (and in
> the original book) came out as small square.
> 
> In plan9 troff I'm getting an upside-down exclamation point.
> Any idea why?  How can I get \(sq to give me a square?

In 9legacy, the (sq is defined with PostScript commands in
sys/lib/troff/font/devutf/charlib/sq

So, as long as it is not an index in a font, but a drawing block
of code, it is a bit weird...

You should try to verify the PostScript code produced in order to
verify that the code for the glyph is added and that the entry in the
dictionnary is correctly called.

But after that, there is ghostscript interpreting the code.

You can perhaps take the PS produced and feed it to another
ghostscript just in order to narrow down the culprit: the PostScript
produced or the way it is rendered i.e. the interpreter.
-- 
        Thierry Laronde <tlaronde +AT+ kergis +dot+ com>
                     http://www.kergis.com/
                    http://kertex.kergis.com/
Key fingerprint = 0FF7 E906 FBAF FE95 FD89  250D 52B1 AE95 6006 F40C

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T87428730dcc006b0-M0357c314ee8599c3a08cb98e
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

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

* Re: [9fans] plan9port troff - \(sq character
  2025-08-11 14:35 [9fans] plan9port troff - \(sq character arnold
  2025-08-11 18:36 ` tlaronde
@ 2025-08-11 18:57 ` arnold
  2025-08-11 19:45   ` ldb
  2025-08-11 19:23 ` LdBeth
  2 siblings, 1 reply; 8+ messages in thread
From: arnold @ 2025-08-11 18:57 UTC (permalink / raw)
  To: 9fans

Additionally, it seems that \(em for the em-dash and
\(dg for the dagger are disappaearing...

Thanks,

Arnold

arnold@skeeve.com wrote:

> Hi.  I'm using plan9port troff to try to reconstitute a book
> from the early 1980s.  The \(sq character in groff (and in
> the original book) came out as small square.
> 
> In plan9 troff I'm getting an upside-down exclamation point.
> Any idea why?  How can I get \(sq to give me a square?
> 
> Much thanks,
> 
> Arnold

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T87428730dcc006b0-Me835d25a029518ae5f807874
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

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

* Re: [9fans] plan9port troff - \(sq character
  2025-08-11 14:35 [9fans] plan9port troff - \(sq character arnold
  2025-08-11 18:36 ` tlaronde
  2025-08-11 18:57 ` arnold
@ 2025-08-11 19:23 ` LdBeth
  2 siblings, 0 replies; 8+ messages in thread
From: LdBeth @ 2025-08-11 19:23 UTC (permalink / raw)
  To: 9fans

> In plan9 troff I'm getting an upside-down exclamation point.
> Any idea why?  How can I get \(sq to give me a square?

Viewing the PostScript produced by tr2post, turns out it uses the font
LucidaSansUnicode25 to render the square, which means you need to have
these fonts installed to $PLAN9/postscript/font and then call "psfonts"
programs to embed the PostScript font.

The "NOTICE" file at $PLAN9/postscript/font says:

This directory is intended to contain the same files
as in /sys/lib/postscript/font in a Plan 9 distribution,
including the Lucida Sans Unicode font from B&H.  
The terms of the font license in Plan 9 do not permit 
us to distribute those files here.

As a substitute for the Lucida Sans fonts, 
Plan 9 from User Space provides Luxi Sans,
also by B&H but available under a more liberal
license, and Deja Vu, a Unicode extension of the
Bitstream Vera family of fonts.

Luxi Sans is similar to Lucida Sans except that
it has no Unicode support.  Deja Vu does have 
good Unicode support.


------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T87428730dcc006b0-M807ee20f66df7326f10ae748
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

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

* Re: [9fans] plan9port troff - \(sq character
  2025-08-11 18:36 ` tlaronde
@ 2025-08-11 19:30   ` arnold
  0 siblings, 0 replies; 8+ messages in thread
From: arnold @ 2025-08-11 19:30 UTC (permalink / raw)
  To: 9fans

It looks like p9 troff is using unicode characters for those
and the Lucida fonts. groff seems to be doing something different.

I'm using plan9port on Linux and evince to view the postscript.

I can send you the .ps file off list if interested.

Thanks,

Arnold

<tlaronde@kergis.com> wrote:

> On Mon, Aug 11, 2025 at 05:35:13PM +0300, arnold@skeeve.com wrote:
> > Hi.  I'm using plan9port troff to try to reconstitute a book
> > from the early 1980s.  The \(sq character in groff (and in
> > the original book) came out as small square.
> > 
> > In plan9 troff I'm getting an upside-down exclamation point.
> > Any idea why?  How can I get \(sq to give me a square?
> 
> In 9legacy, the (sq is defined with PostScript commands in
> sys/lib/troff/font/devutf/charlib/sq
> 
> So, as long as it is not an index in a font, but a drawing block
> of code, it is a bit weird...
> 
> You should try to verify the PostScript code produced in order to
> verify that the code for the glyph is added and that the entry in the
> dictionnary is correctly called.
> 
> But after that, there is ghostscript interpreting the code.
> 
> You can perhaps take the PS produced and feed it to another
> ghostscript just in order to narrow down the culprit: the PostScript
> produced or the way it is rendered i.e. the interpreter.
> --
> Thierry Laronde <tlaronde +AT+ kergis +dot+ com>
>              http://www.kergis.com/
>             http://kertex.kergis.com/
> Key fingerprint = 0FF7 E906 FBAF FE95 FD89  250D 52B1 AE95 6006 F40C

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T87428730dcc006b0-M6e2d4e7791e85e7161bff48d
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

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

* Re: [9fans] plan9port troff - \(sq character
  2025-08-11 18:57 ` arnold
@ 2025-08-11 19:45   ` ldb
  2025-08-13  7:28     ` arnold
  0 siblings, 1 reply; 8+ messages in thread
From: ldb @ 2025-08-11 19:45 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 2079 bytes --]

(Previous reply did not land on the list so this is a repost.)
> In plan9 troff I'm getting an upside-down exclamation point.
> Any idea why?  How can I get \(sq to give me a square?
> 
Viewing the PostScript produced by tr2post, turns out it uses the font
LucidaSansUnicode25 to render the square, which means you need to have
these fonts installed to $PLAN9/postscript/font and then call "psfonts"
programs to embed the PostScript font.

The "NOTICE" file at $PLAN9/postscript/font says:

> This directory is intended to contain the same files
> as in /sys/lib/postscript/font in a Plan 9 distribution,
> including the Lucida Sans Unicode font from B&H. 
> The terms of the font license in Plan 9 do not permit
> us to distribute those files here.
> 
> As a substitute for the Lucida Sans fonts,
> Plan 9 from User Space provides Luxi Sans,
> also by B&H but available under a more liberal
> license, and Deja Vu, a Unicode extension of the
> Bitstream Vera family of fonts.
> 
> Luxi Sans is similar to Lucida Sans except that
> it has no Unicode support.  Deja Vu does have
> good Unicode support.

So you'll need to find the distribution of Plan9 which has following files
LucidaSans-Demi
LucidaSans-Italic
LucidaSans-Typewriter83
LucidaTypewriter
NOTICE
ams
cm
fontmap
lino
lsunr00.pfa
lsunr01.pfa
lsunr02.pfa
lsunr03.pfa
lsunr04.pfa
lsunr05.pfa
lsunr20.pfa
lsunr21.pfa
lsunr22.pfa
lsunr24.pfa
lsunr25.pfa
lw+

You will need to *append *the fontmap file to $PLAN9/postscript/font/fontmap and copy the files `Lucida*` and `*.pfa`, and optionally `cm` and `ams`.

Then `9 tr2post file.dpost | 9 psfonts > file.ps` would render the symbols properly.

You can also use `dpost` from heirloom-doctools to render the troff output to PostScript, saves the procedure to manually install the fonts.
------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T87428730dcc006b0-Mc489ffcde6b2e8093f0e655a
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

[-- Attachment #2: Type: text/html, Size: 3517 bytes --]

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

* Re: [9fans] plan9port troff - \(sq character
  2025-08-11 19:45   ` ldb
@ 2025-08-13  7:28     ` arnold
  2025-08-13 15:00       ` arnold
  0 siblings, 1 reply; 8+ messages in thread
From: arnold @ 2025-08-13  7:28 UTC (permalink / raw)
  To: 9fans

Thanks for this!  I will try it out and report back.

ldb <andpuke@foxmail.com> wrote:

> (Previous reply did not land on the list so this is a repost.)
> > In plan9 troff I'm getting an upside-down exclamation point.
> > Any idea why?  How can I get \(sq to give me a square?
> > 
> Viewing the PostScript produced by tr2post, turns out it uses the font
> LucidaSansUnicode25 to render the square, which means you need to have
> these fonts installed to $PLAN9/postscript/font and then call "psfonts"
> programs to embed the PostScript font.
>
> The "NOTICE" file at $PLAN9/postscript/font says:
>
> > This directory is intended to contain the same files
> > as in /sys/lib/postscript/font in a Plan 9 distribution,
> > including the Lucida Sans Unicode font from B&H. 
> > The terms of the font license in Plan 9 do not permit
> > us to distribute those files here.
> > 
> > As a substitute for the Lucida Sans fonts,
> > Plan 9 from User Space provides Luxi Sans,
> > also by B&H but available under a more liberal
> > license, and Deja Vu, a Unicode extension of the
> > Bitstream Vera family of fonts.
> > 
> > Luxi Sans is similar to Lucida Sans except that
> > it has no Unicode support.  Deja Vu does have
> > good Unicode support.
> 
> So you'll need to find the distribution of Plan9 which has following files
> LucidaSans-Demi
> LucidaSans-Italic
> LucidaSans-Typewriter83
> LucidaTypewriter
> NOTICE
> ams
> cm
> fontmap
> lino
> lsunr00.pfa
> lsunr01.pfa
> lsunr02.pfa
> lsunr03.pfa
> lsunr04.pfa
> lsunr05.pfa
> lsunr20.pfa
> lsunr21.pfa
> lsunr22.pfa
> lsunr24.pfa
> lsunr25.pfa
> lw+
> 
> You will need to *append *the fontmap file to $PLAN9/postscript/font/fontmap and copy the files `Lucida*` and `*.pfa`, and optionally `cm` and `ams`.
> 
> Then `9 tr2post file.dpost | 9 psfonts > file.ps` would render the symbols properly.
> 
> You can also use `dpost` from heirloom-doctools to render the troff output to PostScript, saves the procedure to manually install the fonts.

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T87428730dcc006b0-Mf1fa9c710ef9c14a3939e66a
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

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

* Re: [9fans] plan9port troff - \(sq character
  2025-08-13  7:28     ` arnold
@ 2025-08-13 15:00       ` arnold
  0 siblings, 0 replies; 8+ messages in thread
From: arnold @ 2025-08-13 15:00 UTC (permalink / raw)
  To: 9fans

And indeed this all worked like a charm!  Much thanks!

Arnold

arnold@skeeve.com wrote:

> Thanks for this!  I will try it out and report back.
>
> ldb <andpuke@foxmail.com> wrote:
>
> > (Previous reply did not land on the list so this is a repost.)
> > > In plan9 troff I'm getting an upside-down exclamation point.
> > > Any idea why?  How can I get \(sq to give me a square?
> > > 
> > Viewing the PostScript produced by tr2post, turns out it uses the font
> > LucidaSansUnicode25 to render the square, which means you need to have
> > these fonts installed to $PLAN9/postscript/font and then call "psfonts"
> > programs to embed the PostScript font.
> >
> > The "NOTICE" file at $PLAN9/postscript/font says:
> >
> > > This directory is intended to contain the same files
> > > as in /sys/lib/postscript/font in a Plan 9 distribution,
> > > including the Lucida Sans Unicode font from B&H. 
> > > The terms of the font license in Plan 9 do not permit
> > > us to distribute those files here.
> > > 
> > > As a substitute for the Lucida Sans fonts,
> > > Plan 9 from User Space provides Luxi Sans,
> > > also by B&H but available under a more liberal
> > > license, and Deja Vu, a Unicode extension of the
> > > Bitstream Vera family of fonts.
> > > 
> > > Luxi Sans is similar to Lucida Sans except that
> > > it has no Unicode support.  Deja Vu does have
> > > good Unicode support.
> > 
> > So you'll need to find the distribution of Plan9 which has following files
> > LucidaSans-Demi
> > LucidaSans-Italic
> > LucidaSans-Typewriter83
> > LucidaTypewriter
> > NOTICE
> > ams
> > cm
> > fontmap
> > lino
> > lsunr00.pfa
> > lsunr01.pfa
> > lsunr02.pfa
> > lsunr03.pfa
> > lsunr04.pfa
> > lsunr05.pfa
> > lsunr20.pfa
> > lsunr21.pfa
> > lsunr22.pfa
> > lsunr24.pfa
> > lsunr25.pfa
> > lw+
> > 
> > You will need to *append *the fontmap file to $PLAN9/postscript/font/fontmap and copy the files `Lucida*` and `*.pfa`, and optionally `cm` and `ams`.
> > 
> > Then `9 tr2post file.dpost | 9 psfonts > file.ps` would render the symbols properly.
> > 
> > You can also use `dpost` from heirloom-doctools to render the troff output to PostScript, saves the procedure to manually install the fonts.

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T87428730dcc006b0-Ma268209b427eddc37430456e
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

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

end of thread, other threads:[~2025-08-13 15:46 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-08-11 14:35 [9fans] plan9port troff - \(sq character arnold
2025-08-11 18:36 ` tlaronde
2025-08-11 19:30   ` arnold
2025-08-11 18:57 ` arnold
2025-08-11 19:45   ` ldb
2025-08-13  7:28     ` arnold
2025-08-13 15:00       ` arnold
2025-08-11 19:23 ` LdBeth

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