diff options
author | Russ Cox <rsc@swtch.com> | 2020-07-18 19:52:58 -0400 |
---|---|---|
committer | Russ Cox <rsc@swtch.com> | 2020-07-18 21:54:06 -0400 |
commit | 057d8a76a9d840994edf453f97245efb295d9582 (patch) | |
tree | 08798c81c32cbbc9dfbe5e26ff0ab82380beaa10 | |
parent | 951446a77417743b8ed900cb1b5a1ae08522840e (diff) | |
download | plan9port-057d8a76a9d840994edf453f97245efb295d9582.tar.gz plan9port-057d8a76a9d840994edf453f97245efb295d9582.tar.bz2 plan9port-057d8a76a9d840994edf453f97245efb295d9582.zip |
acme: add font control message
-rw-r--r-- | man/man4/acme.4 | 7 | ||||
-rw-r--r-- | src/cmd/acme/xfid.c | 18 |
2 files changed, 24 insertions, 1 deletions
diff --git a/man/man4/acme.4 b/man/man4/acme.4 index 7449dbd2..5305253e 100644 --- a/man/man4/acme.4 +++ b/man/man4/acme.4 @@ -20,7 +20,7 @@ serves a variety of files for reading, writing, and controlling windows. Some of them are virtual versions of system files for dealing with the virtual console; others control operations -of +of .I acme itself. When a command is run under @@ -234,6 +234,11 @@ Equivalent to the .B Get interactive command with no arguments; accepts no arguments. .TP +.BI font " path +Equivalent to the +.B Font +interactive command with a single (required) argument. +.TP .B limit=addr When the .B ctl diff --git a/src/cmd/acme/xfid.c b/src/cmd/acme/xfid.c index 9c7be2c0..e7d9f4cb 100644 --- a/src/cmd/acme/xfid.c +++ b/src/cmd/acme/xfid.c @@ -701,6 +701,24 @@ out: winsetname(w, r, nr); m += (q+1) - pp; }else + if(strncmp(p, "font ", 5) == 0){ /* execute font command */ + pp = p+5; + m = 5; + q = memchr(pp, '\n', e-pp); + if(q==nil || q==pp){ + err = Ebadctl; + break; + } + *q = 0; + nulls = FALSE; + cvttorunes(pp, q-pp, r, &nb, &nr, &nulls); + if(nulls){ + err = "nulls in font string"; + break; + } + fontx(&w->body, nil, nil, FALSE, XXX, r, nr); + m += (q+1) - pp; + }else if(strncmp(p, "dump ", 5) == 0){ /* set dump string */ pp = p+5; m = 5; |