9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] p9p acme startup fonts.
@ 2005-12-02 18:40 erik quanstrom
  2005-12-02 18:58 ` Russ Cox
  0 siblings, 1 reply; 6+ messages in thread
From: erik quanstrom @ 2005-12-02 18:40 UTC (permalink / raw)
  To: 9fans

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);


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2005-12-09 14:45 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-12-02 18:40 [9fans] p9p acme startup fonts erik quanstrom
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

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).