9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* Re: [9fans] Japanese Font
@ 2001-02-19  2:11 suzuki
  0 siblings, 0 replies; 12+ messages in thread
From: suzuki @ 2001-02-19  2:11 UTC (permalink / raw)
  To: 9fans

>Now, I'm incorporating those as:

It does not mean I elided those definitions in lucida fonts, but just does
I set lucidasans as our default fonts.

Kenji



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

* Re: [9fans] Japanese Font
@ 2001-02-20  3:14 suzuki
  0 siblings, 0 replies; 12+ messages in thread
From: suzuki @ 2001-02-20  3:14 UTC (permalink / raw)
  To: 9fans

Sorry, I entered wrong command in acme.



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

* Re: [9fans] Japanese Font
@ 2001-02-19  2:18 okamoto
  0 siblings, 0 replies; 12+ messages in thread
From: okamoto @ 2001-02-19  2:18 UTC (permalink / raw)
  To: 9fans

>Now, I'm incorporating those as:

It does not mean I elided those definitions in lucida fonts, but just does
I set lucidasans as our default fonts.

Kenji



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

* Re: [9fans] Japanese Font
@ 2001-02-19  2:13 okamoto
  0 siblings, 0 replies; 12+ messages in thread
From: okamoto @ 2001-02-19  2:13 UTC (permalink / raw)
  To: 9fans

Well, I've been testing those various sized Japanese fonts in our environment,
and got an different view from the first impression below.

>In my case, I editted as follows:
>
>lucidasans/unicode.6.font	for 10x10 Kanji
>lucida/unicode.5.font		for 12x10 kanji
>lucida/unicode.6.font		for 14x14 kanji
>lucida/unicode.7.font		for 16x16 kanji
>lucida/unicode.8.font		for 20x20 kanji
>lucida/unicode.10.font		for 24x24 kanji
>lucida/unicode.14.font		for 32x32 kanji
>lucida/unicode.16.font		for 40x40 kanji
>lucida/unicode.20.font		for 48x48 kanji

Now, I'm incorporating those as:

lucidasans/unicode.6.font	for 10x10 Kanji
lucidasans/unicode.7.font	for 12x10 Kanji
lucidasans/unicode.8.font	for 14x14 Kanji
lucidasans/unicode.9.font	for 16x16 Kanji
lucidasans/unicode.10.font	for 20x20m Kanji
lucidasans/unicode.13.font	for 24x24 Kanji

lucidasans/boldunicode.10.font	for 20x20b Kanji
I appllied medium fonts to those tentatively, althoughwe lack other
bold faces.  This is also true for typeunidoee.*.font.

I'm now, then, using lucidasans fonts as our default fonts, because I felt
lucida fonts are too light...

The default acme proportinal font is lucidasans/euro.8.font, and I replaced
this by lucidasans/unicode.9.font for 1600x1200 desktop, and lucidasans/
unicode.8.font for 1024x768 notebook.  This is because 14x14 dotts Kanji
font does not always present right Kanji.   The lucidasans/unicode.7.font
may help you when you are using lower resolution display...

Kenji



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

* Re: [9fans] Japanese Font
@ 2001-02-15  4:50 okamoto
  0 siblings, 0 replies; 12+ messages in thread
From: okamoto @ 2001-02-15  4:50 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 261 bytes --]

I replaced Japanese Subfont files by those with individual bdf files.
I did not do it to avoid making those file sizes too large...

I also added jis20m.tgz for medium 20 dotts font (jis20b.tgz is for
boldface) which I forgot to include before.

Kenji


[-- Attachment #2: Type: message/rfc822, Size: 1871 bytes --]

From: okamoto@granite.cias.osakafu-u.ac.jp
To: 9fans@cse.psu.edu
Subject: Re: [9fans] Japanese Font
Date: Tue, 13 Feb 2001 16:24:59 0900
Message-ID: <20010213072601.535B8199D5@mail.cse.psu.edu>

>Ok, I made some Japanese fonts for Plan9, which includes 10x10, 12x10,
>14x14, 20x20, 32x32, 40x40, 48x48 dotts, and going to put those to our
>web page (http://basalt.cias.osakafu-u.ac.jp/plan9/p9index.html).

Ok, this url is:

http://basalt.cias.osakafu-u.ac.jp/plan9/s45.html

Be carefull!  Those files are Subfont style, and fairly large.  ^_^

Kenji

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

* Re: [9fans] Japanese Font
@ 2001-02-13  7:24 okamoto
  0 siblings, 0 replies; 12+ messages in thread
From: okamoto @ 2001-02-13  7:24 UTC (permalink / raw)
  To: 9fans

>Ok, I made some Japanese fonts for Plan9, which includes 10x10, 12x10,
>14x14, 20x20, 32x32, 40x40, 48x48 dotts, and going to put those to our
>web page (http://basalt.cias.osakafu-u.ac.jp/plan9/p9index.html).

Ok, this url is:

http://basalt.cias.osakafu-u.ac.jp/plan9/s45.html

Be carefull!  Those files are Subfont style, and fairly large.  ^_^

Kenji



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

* Re: [9fans] Japanese Font
@ 2001-02-13  5:35 okamoto
  0 siblings, 0 replies; 12+ messages in thread
From: okamoto @ 2001-02-13  5:35 UTC (permalink / raw)
  To: 9fans

Ok, I made some Japanese fonts for Plan9, which includes 10x10, 12x10,
14x14, 20x20, 32x32, 40x40, 48x48 dotts, and going to put those to our
web page (http://basalt.cias.osakafu-u.ac.jp/plan9/p9index.html).

To use those fonts, you may want to edit your /lib/font/bit/pelm/unicode.*.font
or /lib/font/bit/lucida/unicode.*.font files.  The 14x14 font will fit best to
pelm/unicode.8.font...

In my case, I editted as follows:

lucidasans/unicode.6.font	for 10x10 Kanji
lucida/unicode.5.font		for 12x10 kanji
lucida/unicode.6.font		for 14x14 kanji
lucida/unicode.7.font		for 16x16 kanji
lucida/unicode.8.font		for 20x20 kanji
lucida/unicode.10.font		for 24x24 kanji
lucida/unicode.14.font		for 32x32 kanji
lucida/unicode.16.font		for 40x40 kanji
lucida/unicode.20.font		for 48x48 kanji

Some of those will not fit just to the dot size of JIS Kanji, and I tried the most
nearest one.

(EXAMPLE 1)
I editted also font definitions of rdhtml.c of mothra (Miller's 3ed patch + my
Japanese patch) as follows:

typedef struct Fontdata Fontdata;
struct Fontdata{
	char *name;
	Font *font;
	int space;
}fontlist[2][4][4]={
	"lucidasans/latin1.6", 0, 0,
	"lucidasans/latin1.7", 0, 0,
	"lucidasans/latin1.10", 0, 0,
	"lucidasans/latin1.13", 0, 0,

	"lucidasans/italiclatin1.6", 0, 0,
	"lucidasans/italiclatin1.7", 0, 0,
	"lucidasans/italiclatin1.10", 0, 0,
	"lucidasans/italiclatin1.13", 0, 0,

	"lucidasans/boldlatin1.6", 0, 0,
	"lucidasans/boldlatin1.7", 0, 0,
	"lucidasans/boldlatin1.10", 0, 0,
	"lucidasans/boldlatin1.13", 0, 0,

	"lucidasans/typelatin1.6", 0, 0,
	"lucidasans/typelatin1.7", 0, 0,
	"pelm/ascii.12", 0, 0,
	"pelm/ascii.16", 0, 0,

	"lucida/unicode.6", 0, 0,
	"lucida/unicode.7", 0, 0,
	"lucida/unicode.10", 0, 0,
	"lucida/unicode.14", 0, 0,

	"lucida/unicode.6", 0, 0,
	"lucida/unicode.7", 0, 0,
	"lucida/unicode.10", 0, 0,
	"lucida/unicode.14", 0, 0,

	"lucida/unicode.6", 0, 0,
	"lucida/unicode.7", 0, 0,
	"lucida/unicode.10", 0, 0,
	"lucida/unicode.14", 0, 0,

	"lucida/unicode.6", 0, 0,
	"lucida/unicode.7", 0, 0,
	"lucida/unicode.10", 0, 0,
	"lucida/unicode.14", 0, 0,

};

Yes, I got good results for our above mentioned UTF-8/Japanese EUC web page.


(EXAMPLE 2)
For charon, I defined those fonts as follows (in appl/charon/charon_gui.b)

init()
{
	#shannon_gui=load Shannon_GUI Shannon_GUI->PATH;
	#if(shannon_gui==nil)
	#	CU->raise(sys->sprint("Exinternal: couldn't load Shannon_GUI:%r"));
	#shannon_gui->init();

	CtlFnt=1;
	fonts=array[NumFnt] of {
	FntR*NumSize+Tiny => Fontinfo("/fonts/lucidasans/unicode.6.font", nil, 0),
	FntR*NumSize+Small => ("/fonts/lucida/unicode.6.font", nil, 0),
	FntR*NumSize+Normal => ("/fonts/lucida/unicode.7.font", nil, 0),
	FntR*NumSize+Large => ("/fonts/lucida/unicode.10font", nil, 0),
	FntR*NumSize+Verylarge => ("/fonts/lucida/unicode.14.font", nil, 0),

	......
	......
};

Unfortunately, I got only Normal size of Japanese text.

Kenji



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

* Re: [9fans] Japanese Font
@ 2001-02-09  4:16 okamoto
  0 siblings, 0 replies; 12+ messages in thread
From: okamoto @ 2001-02-09  4:16 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 180 bytes --]

Thank you very much, Rob.

Yes, I was wondering there must be some smart way like your first method
in Plan 9, but not only by forcing it strongly.   I will try it.

Kenji


[-- Attachment #2: Type: message/rfc822, Size: 2008 bytes --]

From: "rob pike" <rob@plan9.bell-labs.com>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] Japanese Font
Date: Thu, 8 Feb 2001 22:41:43 -0500
Message-ID: <20010209034147.2ACFB199E1@mail.cse.psu.edu>

Yes, I understand that.  I was trying to tell you the way to do it.
It's like this, schematically:

	s = allocimage(0, 0, HUGE, height);
	x = 0;
	for(i in number of characters){
		c = allocmemimage(0, 0, c.width, height);
		convert bdf to character in c
		draw(s, Rect(x, 0, x+c.width, height), c, nil, ZP);
		fontchar[i] = {...., x, ...};
		x += c.width;
	}
	t = allocimage(0, 0, x, height);
	draw(t, t->r, s, nil, ZP);

Or you could calculate the subfont width before allocating
s by adding another loop.

-rob

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

* Re: [9fans] Japanese Font
@ 2001-02-09  3:41 rob pike
  0 siblings, 0 replies; 12+ messages in thread
From: rob pike @ 2001-02-09  3:41 UTC (permalink / raw)
  To: 9fans

Yes, I understand that.  I was trying to tell you the way to do it.
It's like this, schematically:

	s = allocimage(0, 0, HUGE, height);
	x = 0;
	for(i in number of characters){
		c = allocmemimage(0, 0, c.width, height);
		convert bdf to character in c
		draw(s, Rect(x, 0, x+c.width, height), c, nil, ZP);
		fontchar[i] = {...., x, ...};
		x += c.width;
	}
	t = allocimage(0, 0, x, height);
	draw(t, t->r, s, nil, ZP);

Or you could calculate the subfont width before allocating
s by adding another loop.

-rob



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

* Re: [9fans] Japanese Font
@ 2001-02-09  3:34 okamoto
  0 siblings, 0 replies; 12+ messages in thread
From: okamoto @ 2001-02-09  3:34 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 859 bytes --]

Hmm, my English has big problem...

I have now compressed subfont images for 32 bitts Kanji font, and I can see
those by tweak, and which was my test to compare the 16 and 24 bitts fonts
between yours and mine.

Now, I'm going into next step, ie. to make Kanji subfonts non-multiple of eight,
such as 14 dotts, 12 dotts and even 8 dotts.  To achieve those, we need an
algorism (of course, we can do it only by strong force, too :-)) to pack redundant
bitts included in BDF BITMAP lines.  For an example, each bitmap of k14.bdf file
includes 14 lines as below lines:  (those are expressed as hexadecimal number)

x000 0000 0000 000x
x000 0000 0000 000x
         ....
x000 0000 0000 000x

where 'x' bit are the redundant bit, and are always 0.

I think we have to eliminate all the redundant 'x' to make 14x14 bit subfont
image.

Kenji


[-- Attachment #2: Type: message/rfc822, Size: 1874 bytes --]

From: "rob pike" <rob@plan9.bell-labs.com>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] Japanese Font
Date: Thu, 8 Feb 2001 22:14:37 -0500
Message-ID: <20010209031449.D7F5F199E1@mail.cse.psu.edu>

Pack the characters as tightly as you can without overlap.  The associated
width information (Fontchar) has sufficient information to extract them.
	tweak /lib/font/bit/lucidasans/lsb.24
(or any other subfont file) to see what a subfont looks like.

If you have a routine that can extract a single character image from the
.bdf file, then draw() is all you need to pack the pixels.

-rob

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

* Re: [9fans] Japanese Font
@ 2001-02-09  3:14 rob pike
  0 siblings, 0 replies; 12+ messages in thread
From: rob pike @ 2001-02-09  3:14 UTC (permalink / raw)
  To: 9fans

Pack the characters as tightly as you can without overlap.  The associated
width information (Fontchar) has sufficient information to extract them.
	tweak /lib/font/bit/lucidasans/lsb.24
(or any other subfont file) to see what a subfont looks like.

If you have a routine that can extract a single character image from the
.bdf file, then draw() is all you need to pack the pixels.

-rob



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

* [9fans] Japanese Font
@ 2001-02-09  3:06 okamoto
  0 siblings, 0 replies; 12+ messages in thread
From: okamoto @ 2001-02-09  3:06 UTC (permalink / raw)
  To: plan9

I think I got 32 bits Japanese fonts successfully from its BDF formated file.  ^_^
Of course, I made test whether I can make same 16 and 24 bits files
as in Plan 9 distribution, and I got success.

Before going into more to make non-multiple of 8 bits fonts, is there any
example of algorism to pack such image to subfont?   For an example,
each line of bitmap format of k14.bdf format is as follows:
x000 0000 0000 000x
where 'x' is not used.

Kenji



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

end of thread, other threads:[~2001-02-20  3:14 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-02-19  2:11 [9fans] Japanese Font suzuki
  -- strict thread matches above, loose matches on Subject: below --
2001-02-20  3:14 suzuki
2001-02-19  2:18 okamoto
2001-02-19  2:13 okamoto
2001-02-15  4:50 okamoto
2001-02-13  7:24 okamoto
2001-02-13  5:35 okamoto
2001-02-09  4:16 okamoto
2001-02-09  3:41 rob pike
2001-02-09  3:34 okamoto
2001-02-09  3:14 rob pike
2001-02-09  3:06 okamoto

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