Re: [9fans] Whats the default font in Acme?

2021-02-20 Thread Ethan Gardener
I forgot the EOF tokens, sorry for the noise. I shouldn't do this while tired, 
or maybe at all.

% for(n in _get*){echo 'cat >' $n '< _get_1_size < $dir^font
if(! ~ $status '') exit
fontsrv -p $name^$dir^font | 
ssam '1d
,x=.* =d
,s=.+=& > '^$dir^'&=g
,x=^=i=fontsrv -p '''^$name^$dir^'''=' | rc
EOF

cat > _get_all_sizes <[1=2]
mkdir -p $dir
fontsrv -p $name^$dir^font > $dir^font
fontsrv -p $name^$dir^font | 
ssam '1d
,x=.* =d
,s=.+=& > '^$dir^'&=g
,x=^=i=fontsrv -p '''^$name^$dir^'''=' | rc
}
EOF

cat > _get_all_sizes-noaa <[1=2]
mkdir -p $dir
fontsrv -p $name^$dir^font > $dir^font
fontsrv -p $name^$dir^font | 
ssam '1d
,x=.* =d
,s=.+=& > '^$dir^'&=g
,x=^=i=fontsrv -p '''^$name^$dir^'''=' | rc
}
}
EOF

cat > _get_all_sizes-prefix-version < $prefix^.font

fontsrv -p $name^$dir^font | 
ssam '1d
,x=.* =d
,s=.*=& > '^$prefix^'-&=g
,x=^=i=fontsrv -p '''^$name^$dir^'''=
' #| rc
}
EOF


--
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/Td0ab6c3112c95493-M4b945fa58f69efff23098167
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription


Re: [9fans] Whats the default font in Acme?

2021-02-20 Thread Ethan Gardener
Years ago, I used to convert fonts by copying from fontsrv -p. This was due to 
bugs fontsrv had at the time, but I guess it may still be useful. 

Here's the 4 scripts I used to use, for whatever they might be worth.

% for(n in _get*){echo 'cat >' $n '< _get_1_size < $dir^font
if(! ~ $status '') exit
fontsrv -p $name^$dir^font | 
ssam '1d
,x=.* =d
,s=.+=& > '^$dir^'&=g
,x=^=i=fontsrv -p '''^$name^$dir^'''=' | rc

cat > _get_all_sizes <[1=2]
mkdir -p $dir
fontsrv -p $name^$dir^font > $dir^font
fontsrv -p $name^$dir^font | 
ssam '1d
,x=.* =d
,s=.+=& > '^$dir^'&=g
,x=^=i=fontsrv -p '''^$name^$dir^'''=' | rc
}

cat > _get_all_sizes-noaa <[1=2]
mkdir -p $dir
fontsrv -p $name^$dir^font > $dir^font
fontsrv -p $name^$dir^font | 
ssam '1d
,x=.* =d
,s=.+=& > '^$dir^'&=g
,x=^=i=fontsrv -p '''^$name^$dir^'''=' | rc
}
}

cat > _get_all_sizes-prefix-version < $prefix^.font

fontsrv -p $name^$dir^font | 
ssam '1d
,x=.* =d
,s=.*=& > '^$prefix^'-&=g
,x=^=i=fontsrv -p '''^$name^$dir^'''=
' #| rc
}

--
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/Td0ab6c3112c95493-M641c4f27e469e9cb1dff1426
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription


[9fans] Acme IRC Basic SASL Support

2021-02-20 Thread Connor Taffe
I took Russ’s Irc client at https://swtch.com/irc/  and 
added enough SASL PLAIN
support to access Freenode so that I could use it as my IRC client.

It’s available at https://github.com/cptaffe/airc 
.

I documented the flow as best I could in this commit 

 , and I’d appreciate constructive
feedback on how to improve the implementation or add more comprehensive SASL 
support.
My initial idea was to support CertFP, but I had difficulty getting tlsClient 
in libsec to work,
and reading through the code I’m not sure it supports sending the client 
certificate
(there’s a bit which indicates it always sends an empty cert).

Another peculiarity is that mk all fails with a symbol error because it builds 
Irc.o and irc.o
from irc.c on macOS, I believe this is to do with case-insensitivity in Apple’s 
FS. To get
around this, just run the 9l command by hand without Irc.o.

After mk install, running "Irc -n nick -p passed irc.freenode.net 
" should attempt SASL PLAIN.

Speaking of IRC, is there a plan9port IRC channel?
--
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/Tb7203430b1bb75f4-M26d3edd1bad27ee619cfaeaf
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription


Re: [9fans] Whats the default font in Acme?

2021-02-20 Thread Mark van Atten
On Sat, 20 Feb 2021 at 16:26, Russ Cox  wrote:
>
> For what it's worth, you don't need to mount fontsrv anywhere.

That is how I used to do it, as in the man page; but for some,
probably local, reason the problem I described now arises
(actually as of commit 5f0fa18, fontsrv: handle non-BMP runes on X11).
I will look into that, and use the mountpoint in my home dir in the meantime.

Mark.

--
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/Td0ab6c3112c95493-M58a92fdb0b48a23c2bc700b3
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription


Re: [9fans] Whats the default font in Acme?

2021-02-20 Thread Russ Cox
For what it's worth, you don't need to mount fontsrv anywhere.
You can just use 'fontsrv -p .' to list the fonts,
and then refer to them as /mnt/font/Name/SIZEa/font.
For example:

/usr/local/plan9/bin/acme \
    -f /mnt/font/LucidaGrande/12a/font \
    -F /mnt/font/SourceCodePro-Regular/12a/font

In that form, acme will "open" /mnt/font/... by reading fontsrv -p's
output.

Best,
Russ

--
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/Td0ab6c3112c95493-Mdc64b25095aa74ff0c6c1e13
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription


Re: [9fans] Whats the default font in Acme?

2021-02-20 Thread Mark van Atten
It seems to have been some kind of permissions problem. If I run
fontsrv with a mountpoint created in my home directory,
it works perfectly.
Mark.

--
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/Td0ab6c3112c95493-M4005dd63b8324e8b0133f10d
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription