commit 057d8a76a9d840994edf453f97245efb295d9582 from: Russ Cox date: Sun Jul 19 01:54:06 2020 UTC acme: add font control message commit - 951446a77417743b8ed900cb1b5a1ae08522840e commit + 057d8a76a9d840994edf453f97245efb295d9582 blob - 7449dbd29e0257cc8bd813f582efd3cb8a8acefc blob + 5305253e94225d5ffcbd925a0bd0ac2321eb5dee --- man/man4/acme.4 +++ man/man4/acme.4 @@ -20,7 +20,7 @@ serves a variety of files for reading, writing, and co 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 blob - 9c7be2c0416c7e5c83b95a6e9d9963aa3ac41028 blob + e7d9f4cb7f3e822f9bd06a04608d6c4020c9e107 --- src/cmd/acme/xfid.c +++ src/cmd/acme/xfid.c @@ -699,6 +699,24 @@ out: seq++; filemark(w->body.file); 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 */