9front - general discussion about 9front
 help / color / mirror / Atom feed
* [9front] recent changes
@ 2020-12-08 16:01 Stanley Lieber
  2020-12-08 16:08 ` [9front] " Stanley Lieber
  2020-12-08 16:49 ` [9front] " ori
  0 siblings, 2 replies; 12+ messages in thread
From: Stanley Lieber @ 2020-12-08 16:01 UTC (permalink / raw)
  To: 9front

some recent change(s) has broken two things for me:

- page -w (errors that exportfs cannot find fd 7)
- troff/ghostscript no longer renders my custom-added fonts (falls back to default R, but the character spacing is all screwed up).

because my computing time is severely limited i have not been able to troubleshoot yet.

sl


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

* [9front] Re: recent changes
  2020-12-08 16:01 [9front] recent changes Stanley Lieber
@ 2020-12-08 16:08 ` Stanley Lieber
  2020-12-08 16:46   ` Eckard Brauer
                     ` (2 more replies)
  2020-12-08 16:49 ` [9front] " ori
  1 sibling, 3 replies; 12+ messages in thread
From: Stanley Lieber @ 2020-12-08 16:08 UTC (permalink / raw)
  To: 9front

On December 8, 2020 11:01:48 AM EST, Stanley Lieber <sl@stanleylieber.com> wrote:
>some recent change(s) has broken two things for me:
>
>- page -w (errors that exportfs cannot find fd 7)
>- troff/ghostscript no longer renders my custom-added fonts (falls back
>to default R, but the character spacing is all screwed up).
>
>because my computing time is severely limited i have not been able to
>troubleshoot yet.
>
>sl

also, i seem to have somehow misplaced my instructions for adding new fonts to troff/postscript. anyone recall who figured this out for us?

sl

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

* Re: [9front] Re: recent changes
  2020-12-08 16:08 ` [9front] " Stanley Lieber
@ 2020-12-08 16:46   ` Eckard Brauer
  2020-12-08 16:50   ` cinap_lenrek
  2020-12-08 16:56   ` Kurt H Maier
  2 siblings, 0 replies; 12+ messages in thread
From: Eckard Brauer @ 2020-12-08 16:46 UTC (permalink / raw)
  To: 9front, Stanley Lieber

> On December 8, 2020 11:01:48 AM EST, Stanley Lieber
> <sl@stanleylieber.com> wrote: [...]  
> 
> also, i seem to have somehow misplaced my instructions for adding new
> fonts to troff/postscript. anyone recall who figured this out for us?
> 
> sl

Maybe you're asking for a topic just 3 years back (Dec 13, 2017, some
responses from Travis Moore). See below for 1st part.

Best regards,
E.

From: Travis Moore <umbraticus@prosimetrum.com>
Date: Wed, 13 Dec 2017 13:07:30 +1300
Subject: Re: [9front] WANTED: instructions for adding fonts to troff

> I'd like to expand the font options for troff in my installation.
> How might this be accomplished?

I've kept your mail in my inbox for nearly a year because I'd been
meaning to look into this.  I finally got around to it and figured out
a method of sorts:

1.	Obtain postscript versions of the font.
	The file with the font data has the extension .pfa or .pfb
	The file with the font metrics has the extension .afm
	I tested on the following materials:

		http://mirrors.ctan.org/fonts/urw/garamond.zip
		https://www.math.utah.edu/~beebe/fonts/urwfonts-1.0.zip
		https://www.math.utah.edu/~beebe/fonts/utopia-1.0.zip
		https://www.math.utah.edu/~beebe/fonts/charter-1.0.zip

	Apparently there are tools to convert from other formats.

2.	Convert the font metrics to a troff font description.
	The attached awk script is something I hacked up to do this:

		convpsfont ugmr8a.afm GA	# URW Garamond
	
	This creates a file GA which should look something like this:

		name GA
		fontname GaramondNo8-Reg
		spacewidth 26
		charset
		!	26	2	33
		"	42	2	34
		&c...

	Choose a name not in conflict with those in
	/sys/lib/troff/font/devutf/ Check the contents of this file
	makes sense; I haven't tested many fonts and my script may need
	adjustment or the output may need to be tweaked by hand. The
	troff font format is described in: /sys/doc/troff.ps!32
	The .afm format can be found at:
		http://www.adobe.com/content/dam/acom/en/devnet/font/pdfs/5004.AFM_Spec.pdf

	Put the resulting file GA in /sys/lib/troff/font/devutf/
	or else use troff's -F flag to point to the dir that holds it.

	You can now rm the .afm file or else keep it with its .pfa/.pfb

3.	Let postscript see the font.
	Put the font (.pfa/.pfb) in /sys/lib/postscript/font/
	I put mine in a subdir called useradded.
	Add an entry at the bottom of /sys/lib/postscript/font/fontmap:

		% fonts added by user
		GaramondNo8-Reg	useradded/ugmr8a.pfb

	Create a file called /sys/lib/postscript/troff/GA:

		0x0000 0x00ff GaramondNo8-Reg
		0x2010 0x2044 GaramondNo8-Reg
		0xfb00 0xfb06 GaramondNo8-Reg

	You can use other fonts for ranges missing from your font.

4.	Let ghostscript see the font.

		cd /sys/lib/ghostscript/font && mk

5.	Test.
		echo '.sp 1i
			.ft GA
			.ps 14
			Pack my box with five dozen liquor jugs.
			ø ß á ä à æ ¼ ½ ¾ © ¶ §' | troff | page

	ps2pdf will embed the font and make it printable everywhere.

Hope this is useful to someone,

Travis

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

* Re: [9front] recent changes
  2020-12-08 16:01 [9front] recent changes Stanley Lieber
  2020-12-08 16:08 ` [9front] " Stanley Lieber
@ 2020-12-08 16:49 ` ori
  2020-12-08 20:08   ` cinap_lenrek
  1 sibling, 1 reply; 12+ messages in thread
From: ori @ 2020-12-08 16:49 UTC (permalink / raw)
  To: sl, 9front

Quoth Stanley Lieber <sl@stanleylieber.com>:
> some recent change(s) has broken two things for me:
> 
> - page -w (errors that exportfs cannot find fd 7)

Page doesn't use exportfs directly, as far as I can tell.
Maybe something to do with the document format? Does

	page -w /sys/doc/acidpaper.ps

work for you?

> - troff/ghostscript no longer renders my custom-added
>   fonts (falls back to default R, but the character
>   spacing is all screwed up).

Don't know how to add ps fonts, and I suspect I don't
have any suitable ones.

> because my computing time is severely limited i have not
> been able to troubleshoot yet.
> 
> sl

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

* Re: [9front] Re: recent changes
  2020-12-08 16:08 ` [9front] " Stanley Lieber
  2020-12-08 16:46   ` Eckard Brauer
@ 2020-12-08 16:50   ` cinap_lenrek
  2020-12-08 17:04     ` Stuart Morrow
  2020-12-08 16:56   ` Kurt H Maier
  2 siblings, 1 reply; 12+ messages in thread
From: cinap_lenrek @ 2020-12-08 16:50 UTC (permalink / raw)
  To: 9front

how can we reproduce the page -w issue?

page -w works just fine for me.

also, why is there exportfs?

can you elaborate what the setup is?

--
cinap

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

* Re: [9front] Re: recent changes
  2020-12-08 16:08 ` [9front] " Stanley Lieber
  2020-12-08 16:46   ` Eckard Brauer
  2020-12-08 16:50   ` cinap_lenrek
@ 2020-12-08 16:56   ` Kurt H Maier
  2 siblings, 0 replies; 12+ messages in thread
From: Kurt H Maier @ 2020-12-08 16:56 UTC (permalink / raw)
  To: 9front

On Tue, Dec 08, 2020 at 11:08:38AM -0500, Stanley Lieber wrote:
> also, i seem to have somehow misplaced my instructions for adding new fonts to troff/postscript. anyone recall who figured this out for us?

http://sciops.net/downloads/vga/

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

* Re: [9front] Re: recent changes
  2020-12-08 16:50   ` cinap_lenrek
@ 2020-12-08 17:04     ` Stuart Morrow
  0 siblings, 0 replies; 12+ messages in thread
From: Stuart Morrow @ 2020-12-08 17:04 UTC (permalink / raw)
  To: 9front

Page is rather queer, when it gets to making new windows. I haven't
looked into why, but my patched version of page, when you use zerox,
behaves differently. It seems somehow to skip the extra while loop I
put in that makes you re-left-click to pan again.

https://static.wikia.nocookie.net/zimwiki/images/1/1d/Mysterious_Mysteries_of_Strange_Mystery_(Gaz%2C_Taster_of_Pork).png

On 08/12/2020, cinap_lenrek@felloff.net <cinap_lenrek@felloff.net> wrote:
> how can we reproduce the page -w issue?
>
> page -w works just fine for me.
>
> also, why is there exportfs?
>
> can you elaborate what the setup is?
>
> --
> cinap
>

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

* Re: [9front] recent changes
  2020-12-08 16:49 ` [9front] " ori
@ 2020-12-08 20:08   ` cinap_lenrek
  2020-12-09  0:24     ` cinap_lenrek
  0 siblings, 1 reply; 12+ messages in thread
From: cinap_lenrek @ 2020-12-08 20:08 UTC (permalink / raw)
  To: 9front

> Page doesn't use exportfs directly, as far as I can tell.
> Maybe something to do with the document format? Does

>	page -w /sys/doc/acidpaper.ps

> work for you?

yes, it works fine for me.

--
cinap

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

* Re: [9front] recent changes
  2020-12-08 20:08   ` cinap_lenrek
@ 2020-12-09  0:24     ` cinap_lenrek
  2020-12-09  0:29       ` Stanley Lieber
  0 siblings, 1 reply; 12+ messages in thread
From: cinap_lenrek @ 2020-12-09  0:24 UTC (permalink / raw)
  To: 9front

i located the issue.

it can be reproduced when cpuing to another machine and
running window -m.

the problem is that OCEXEC doesnt work too tell with
/srv files.

when any program opens a /srv file with OCEXEC flag,
it sets the close-on-exec flag on the shared channel,
resulting in all subsequent opens (regardless of the
flag) to have close-on-exec semantics.

that happens with the $wsys channel.

it is interesting as devsrv itself tries hard to
prevent you from posting a file descriptor with the
close-on-exec flag set. but subsequent opens can
still poison the channel.

the fixes are pushed.

--
cinap

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

* Re: [9front] recent changes
  2020-12-09  0:24     ` cinap_lenrek
@ 2020-12-09  0:29       ` Stanley Lieber
  2020-12-09  9:34         ` umbraticus
  0 siblings, 1 reply; 12+ messages in thread
From: Stanley Lieber @ 2020-12-09  0:29 UTC (permalink / raw)
  To: 9front

On December 8, 2020 7:24:49 PM EST, cinap_lenrek@felloff.net wrote:
>i located the issue.
>
>it can be reproduced when cpuing to another machine and
>running window -m.
>
>the problem is that OCEXEC doesnt work too tell with
>/srv files.
>
>when any program opens a /srv file with OCEXEC flag,
>it sets the close-on-exec flag on the shared channel,
>resulting in all subsequent opens (regardless of the
>flag) to have close-on-exec semantics.
>
>that happens with the $wsys channel.
>
>it is interesting as devsrv itself tries hard to
>prevent you from posting a file descriptor with the
>close-on-exec flag set. but subsequent opens can
>still poison the channel.
>
>the fixes are pushed.
>
>--
>cinap

thank you, i can confirm tonight.

sl

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

* Re: [9front] recent changes
  2020-12-09  0:29       ` Stanley Lieber
@ 2020-12-09  9:34         ` umbraticus
  2020-12-09 14:32           ` Stanley Lieber
  0 siblings, 1 reply; 12+ messages in thread
From: umbraticus @ 2020-12-09  9:34 UTC (permalink / raw)
  To: 9front

re ps fonts, check whether updating clobbered
/sys/lib/postscript/font/fontmap

umbraticus

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

* Re: [9front] recent changes
  2020-12-09  9:34         ` umbraticus
@ 2020-12-09 14:32           ` Stanley Lieber
  0 siblings, 0 replies; 12+ messages in thread
From: Stanley Lieber @ 2020-12-09 14:32 UTC (permalink / raw)
  To: 9front

On December 9, 2020 4:34:47 AM EST, umbraticus@prosimetrum.com wrote:
>re ps fonts, check whether updating clobbered
>/sys/lib/postscript/font/fontmap
>
>umbraticus

thanks, after latest rebuild custom fonts behavior is back to normal. didn't have to touch fontmap.

sl

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

end of thread, other threads:[~2020-12-09 14:35 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-08 16:01 [9front] recent changes Stanley Lieber
2020-12-08 16:08 ` [9front] " Stanley Lieber
2020-12-08 16:46   ` Eckard Brauer
2020-12-08 16:50   ` cinap_lenrek
2020-12-08 17:04     ` Stuart Morrow
2020-12-08 16:56   ` Kurt H Maier
2020-12-08 16:49 ` [9front] " ori
2020-12-08 20:08   ` cinap_lenrek
2020-12-09  0:24     ` cinap_lenrek
2020-12-09  0:29       ` Stanley Lieber
2020-12-09  9:34         ` umbraticus
2020-12-09 14:32           ` Stanley Lieber

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