9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: "Ethan Gardener" <eekee57@fastmail.fm>
To: 9fans <9fans@9fans.net>
Subject: Re: [9fans] Whats the default font in Acme?
Date: Sun, 21 Feb 2021 01:27:10 +0000	[thread overview]
Message-ID: <08d95189-06eb-42b5-8275-ab81af771dcf@www.fastmail.com> (raw)
In-Reply-To: <3b1b08b5-ad11-4b70-85b3-e37f06a06e0d@www.fastmail.com>

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 '<<EOF'; cat $n; echo EOF; echo}
cat > _get_1_size <<EOF
#!/data/plan9/plan9port/bin/rc

ifs='
'
name = $1^/
dir = $2^/      # size dir; e.g. '12' or '12a'

mkdir -p $dir
fontsrv -p $name^$dir^font > $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 <<EOF
#!/data/plan9/plan9port/bin/rc

ifs='
'
name = $1
sizedirs = `{fontsrv -p $name}
if(! ~ $status '') exit

for(dir in $sizedirs) {
        echo $dir >[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 <<EOF
#!/data/plan9/plan9port/bin/rc
# workaround for segfaults & stalls with some font/size combinations when anti-aliased.
# uh, it's not just aa, but it's more likely with aa.

ifs='
'
name = $1
sizedirs = `{fontsrv -p $name}
if(! ~ $status '') exit

for(dir in $sizedirs) {
        if(! ~ $dir *[0-9]a/) {
                echo $dir >[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 <<EOF
#!/data/plan9/plan9port/bin/rc

ifs='
'
name = $1
sizedirs = `{fontsrv -p $name}
if(! ~ $status '') exit

for(dir in $sizedirs) {
        prefix = `{echo $dir | sed 's=/=='}
        
        fontsrv -p $name^$dir^font |
        ssam ',x=[^ ]+$=i='^$prefix^'-' > $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

  reply	other threads:[~2021-02-21  1:27 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-17 19:06 bombart
2021-02-17 19:14 ` sirjofri
2021-02-17 19:38   ` Kurt H Maier
2021-02-17 20:07     ` Kurt H Maier
2021-02-18  0:53     ` Skip Tavakkolian
2021-02-19  6:41       ` Conor Williams
2021-02-18  6:14   ` Ethan Gardener
2021-02-18  8:31     ` bombart
2021-02-18  9:04       ` Skip Tavakkolian
2021-02-18 11:04         ` Ethan Gardener
2021-02-19  6:32         ` Mark van Atten
2021-02-19  6:44           ` Conor Williams
2021-02-19  6:49             ` Conor Williams
2021-02-20  6:45           ` Bakul Shah
2021-02-20 12:04             ` Mark van Atten
2021-02-20 15:26               ` Russ Cox
2021-02-20 17:31                 ` Mark van Atten
2021-02-21  1:22           ` Ethan Gardener
2021-02-21  1:27             ` Ethan Gardener [this message]
2021-03-07 14:23           ` Mark van Atten
2021-02-20  0:58         ` [9fans] " cigar562hfsp952fans
2021-02-20  3:47           ` [9fans] " Bakul Shah
2021-02-20  4:21             ` Skip Tavakkolian
2021-02-20  4:50             ` Bakul Shah
2021-02-20  5:45               ` Mark van Atten
2021-02-18  8:41     ` bombart

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=08d95189-06eb-42b5-8275-ab81af771dcf@www.fastmail.com \
    --to=eekee57@fastmail.fm \
    --cc=9fans@9fans.net \
    /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).