9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: erik quanstrom <quanstro@quanstro.net>
To: 9fans@cse.psu.edu
Subject: [9fans] p9p acme startup fonts.
Date: Fri,  2 Dec 2005 12:40:50 -0600	[thread overview]
Message-ID: <20051202184050.9D2DB18AE1A@dexter-peak.quanstro.net> (raw)

i modified acme to not use /lib/font and to try $font
(like 9term) for p9p:

RCS file: RCS/acme.c,v
retrieving revision 1.1
diff -r1.1 acme.c
39,40c39,40
< 	"/lib/font/bit/lucidasans/euro.8.font",
< 	"/lib/font/bit/lucm/unicode.9.font",
---
> 	"lucidasans/euro.8.font",
> 	"lucm/unicode.9.font",
49a50,68
> static char*
> _getfont(char* f, const char* envname, char* fallback){
> 	if (f)
> 		return estrdup(f);
> 	f=getenv(envname);
> 	if (f)
> 		return f;
> 	return smprint("%s/%s", get9root(), fallback);
> }
> 
> static void
> fixfontnames(char* f, char* F){
> 	fontnames[0] = _getfont(f, "font", fontnames[0]);
> 	fontnames[1] = _getfont(F, "fixedfont", fontnames[1]);
> 
> 	//fprint(2, "%s\n", fontnames[0]);
> 	//fprint(2, "%s\n", fontnames[1]);
> }
> 
64a84,85
> 	char* f;
> 	char* F;
69c90,91
< 
---
> 	f=0;
> 	F=0;
95,96c117,118
< 		fontnames[0] = ARGF();
< 		if(fontnames[0] == nil)
---
> 		f = ARGF();
> 		if(f == nil)
100,101c122,123
< 		fontnames[1] = ARGF();
< 		if(fontnames[1] == nil)
---
> 		F = ARGF();
> 		if(F == nil)
123,124c145
< 	fontnames[0] = estrdup(fontnames[0]);
< 	fontnames[1] = estrdup(fontnames[1]);
---
> 	fixfontnames(f,F);


             reply	other threads:[~2005-12-02 18:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-02 18:40 erik quanstrom [this message]
2005-12-02 18:58 ` Russ Cox
2005-12-02 19:27   ` erik quanstrom
2005-12-03 11:37     ` grfgguvf
2005-12-03 14:22       ` erik quanstrom
     [not found]         ` <12529-68307@sneakemail.com>
2005-12-09 14:45           ` [9fans] for peter canning -- " erik quanstrom

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=20051202184050.9D2DB18AE1A@dexter-peak.quanstro.net \
    --to=quanstro@quanstro.net \
    --cc=9fans@cse.psu.edu \
    /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).