aboutsummaryrefslogtreecommitdiff
path: root/src/cmd
diff options
context:
space:
mode:
authorRuss Cox <rsc@swtch.com>2020-07-18 19:52:58 -0400
committerRuss Cox <rsc@swtch.com>2020-07-18 21:54:06 -0400
commit057d8a76a9d840994edf453f97245efb295d9582 (patch)
tree08798c81c32cbbc9dfbe5e26ff0ab82380beaa10 /src/cmd
parent951446a77417743b8ed900cb1b5a1ae08522840e (diff)
downloadplan9port-057d8a76a9d840994edf453f97245efb295d9582.tar.gz
plan9port-057d8a76a9d840994edf453f97245efb295d9582.tar.bz2
plan9port-057d8a76a9d840994edf453f97245efb295d9582.zip
acme: add font control message
Diffstat (limited to 'src/cmd')
-rw-r--r--src/cmd/acme/xfid.c18
1 files changed, 18 insertions, 0 deletions
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;