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

* Re: [9fans] p9p acme startup fonts.
  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
  0 siblings, 1 reply; 6+ messages in thread
From: Russ Cox @ 2005-12-02 18:58 UTC (permalink / raw)
  To: erik quanstrom, Fans of the OS Plan 9 from Bell Labs

Acme's default font is variable-width, but $font is fixed-width.
You may prefer a fixed-width default font, but others do not.

Also, the /lib/font/bit paths are fine - libdraw will cope.

Russ


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

* Re: [9fans] p9p acme startup fonts.
  2005-12-02 18:58 ` Russ Cox
@ 2005-12-02 19:27   ` erik quanstrom
  2005-12-03 11:37     ` grfgguvf
  0 siblings, 1 reply; 6+ messages in thread
From: erik quanstrom @ 2005-12-02 19:27 UTC (permalink / raw)
  To: 9fans

i didn't know most people set $font to a fixed-width font. i've been using a
variable-width $font for a long time:

; echo $font
/home/quanstro/plan9/font/code2000/code2000.14.font

(code2000 provides much better unicode coverage than pelm. and is
readable in smaller sizes.)

i haven't had any difficulties doing this. most programs that absolutely
need a fixed-width font do not play nicely with 9term because they also
use cursor addressing. the major exception being "cal".

i suppose the way to correct this $font abuse would be to use "font", "fixedfont",
and "varfont" environment variables. 

doesn't quite feel right, though.

- erik

Russ Cox <rsc@swtch.com> writes

| 
| Acme's default font is variable-width, but $font is fixed-width.
| You may prefer a fixed-width default font, but others do not.
| 
| Also, the /lib/font/bit paths are fine - libdraw will cope.
| 
| Russ


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

* Re: [9fans] p9p acme startup fonts.
  2005-12-02 19:27   ` erik quanstrom
@ 2005-12-03 11:37     ` grfgguvf
  2005-12-03 14:22       ` erik quanstrom
  0 siblings, 1 reply; 6+ messages in thread
From: grfgguvf @ 2005-12-03 11:37 UTC (permalink / raw)
  To: erik quanstrom, Fans of the OS Plan 9 from Bell Labs

> ; echo $font
> /home/quanstro/plan9/font/code2000/code2000.14.font
>
> (code2000 provides much better unicode coverage than pelm. and is
> readable in smaller sizes.)

The problem with Code2000 is that it's designer doesn't know the
languages he's making the glyphs for. As a consequence, many glyphs
are just "wrong".

For example:
http://www.travelphrases.info/gallery/samples/BitstreamCyberbit__Japanese.gif
http://www.travelphrases.info/gallery/samples/Code2000__Japanese.gif
(see the first (left) glyph in the bottom line)

Or:
http://www.travelphrases.info/gallery/samples/ArialUnicodeMS__GreekPoly.gif
http://www.travelphrases.info/gallery/samples/Code2000__GreekPoly.gif
(also the first character in the bottom line)


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

* Re: [9fans] p9p acme startup fonts.
  2005-12-03 11:37     ` grfgguvf
@ 2005-12-03 14:22       ` erik quanstrom
       [not found]         ` <12529-68307@sneakemail.com>
  0 siblings, 1 reply; 6+ messages in thread
From: erik quanstrom @ 2005-12-03 14:22 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs, grfgguvf

what's wrong with the greek?

i do not have microsoft unicode fonts converted for use with p9p,
but i do have cyberbit. all the greek glyphs that appeared in
side-by-side terminals 

; font = $PLAN9/font/code2000/code2000.16.font 9term &
; font = $PLAN9/font/cyberbit/code2000.16.font 9term &

for each with this script

; grep GREEK UnicodeData.txt | awk -F';' 'length($1)==4 {printf("\\u%s	%s	%s\n", $1, $1, $2);}' | uconv

were the same. cyberbit was missing all the combined greek characters, though.
code 2000 has them.

could you send me some of the codepoints from the 
japanese example so i can check those, too?

are there any unicode fonts out there that offer full coverage from \u0000
to \uffff that aren't super ugly?

code2000 at least has allmost all symbols and arrows. and looks okay.

(uconv just converts \uXXXX → unicode codepoint XXXX.)

- erik

<grfgguvf@gmail.com> writes

| 
| > ; echo $font
| > /home/quanstro/plan9/font/code2000/code2000.14.font
| >
| > (code2000 provides much better unicode coverage than pelm. and is
| > readable in smaller sizes.)
| 
| The problem with Code2000 is that it's designer doesn't know the
| languages he's making the glyphs for. As a consequence, many glyphs
| are just "wrong".
| 
| For example:
| http://www.travelphrases.info/gallery/samples/BitstreamCyberbit__Japanese.gif
| http://www.travelphrases.info/gallery/samples/Code2000__Japanese.gif
| (see the first (left) glyph in the bottom line)
| 
| Or:
| http://www.travelphrases.info/gallery/samples/ArialUnicodeMS__GreekPoly.gif
| http://www.travelphrases.info/gallery/samples/Code2000__GreekPoly.gif
| (also the first character in the bottom line)


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

* Re: [9fans] for peter canning -- p9p acme startup fonts.
       [not found]         ` <12529-68307@sneakemail.com>
@ 2005-12-09 14:45           ` erik quanstrom
  0 siblings, 0 replies; 6+ messages in thread
From: erik quanstrom @ 2005-12-09 14:45 UTC (permalink / raw)
  To: kvchokw02; +Cc: 9fans

sorry to bother the list but i'm getting 451 errors from sneakemail.com:

-Queue ID- --Size-- ----Arrival Time---- -Sender/Recipient-------
DCB64D0F03      708 Fri Dec  9 08:26:21  XXX@yyz
(host mail.sneakemail.com[38.113.6.61] said: 451 Please try again later (in reply to DATA command))
                                         XXX@sneakemail.com

anyway, a couple of people have asked so maybe 
it's not a complete waste of bandwidth.

i used ttftosubf (http://pages.cpsc.ucalgary.ca/~mirtchov/p9/freetype/) to
convert code2000 (http://home.att.net/~jameskass/CODE2000.ZIP). however,
since it's shareware, i'll email anybody a copy of my $PLAN9/font/code2000
but please be able to accept a 20M email if you ask ☺.

- erik

kvchokw02@sneakemail.com writes

| 
| Where can I get code2000 for p9p?
| 
| 	thanks,
| 	Peter CAnning
| On Sat, 2005-12-03 at 08:22 -0600, erik quanstrom
| quanstro-at-quanstro.net |9fans| wrote:
| > what's wrong with the greek?
| > 
| > i do not have microsoft unicode fonts converted for use with p9p,
| > but i do have cyberbit. all the greek glyphs that appeared in
| > side-by-side terminals 
| > 
| > ; font = $PLAN9/font/code2000/code2000.16.font 9term &
| > ; font = $PLAN9/font/cyberbit/code2000.16.font 9term &
| > 
| > for each with this script
| > 
| > ; grep GREEK UnicodeData.txt | awk -F';' 'length($1)==4 {printf("\\u%s	%s	%s\n", $1, $1, $2);}' | uconv
| > 
| > were the same. cyberbit was missing all the combined greek characters, though.
| > code 2000 has them.
| > 
| > could you send me some of the codepoints from the 
| > japanese example so i can check those, too?
| > 
| > are there any unicode fonts out there that offer full coverage from \u0000
| > to \uffff that aren't super ugly?
| > 
| > code2000 at least has allmost all symbols and arrows. and looks okay.
| > 
| > (uconv just converts \uXXXX → unicode codepoint XXXX.)
| > 
| > - erik


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