9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] ttf2subf
@ 2005-05-05  3:06 andrey mirtchovski
  0 siblings, 0 replies; 27+ messages in thread
From: andrey mirtchovski @ 2005-05-05  3:06 UTC (permalink / raw)
  To: 9fans

thanks to Takeshi there's a new freetype-plan9.tgz (and ttf2subf) on ucalgary:

http://pages.cpsc.ucalgary.ca/~mirtchov/p9/freetype/freetype-plan9.tgz

it fixes an underflow which caused some characters to be drawn outside of
the clipping rectangle (i.e. the glyphs appeared to be missing in the final
fonts).

regenerate your fonts from TTFs if you think you may be a victim :)

andrey


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

* Re: [9fans] ttf2subf
  2006-03-23  2:03 erik quanstrom
  2006-03-23  2:27 ` Latchesar Ionkov
@ 2006-03-23 21:38 ` Tim Wiess
  1 sibling, 0 replies; 27+ messages in thread
From: Tim Wiess @ 2006-03-23 21:38 UTC (permalink / raw)
  To: 9fans

> i've been working with code2000, which looks hideous in mono mode, but
> is pretty readable subpixel or antialias mode, but ttf2subf is too
> agressive in its antialiasing and does not snap near-grid vertical or
> horizontal lines to the grid.

    i've noticed this too when playing with verdana. it's still usuable
    but can get annoying with certain bodies of text.



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

* Re: [9fans] ttf2subf
  2006-03-23 11:38   ` erik quanstrom
@ 2006-03-23 14:32     ` Russ Cox
  0 siblings, 0 replies; 27+ messages in thread
From: Russ Cox @ 2006-03-23 14:32 UTC (permalink / raw)
  To: quanstro; +Cc: 9fans

> 9term and acme also use libframe.

but 9term (as i had noted) is the only one that
explicitly calls _frredraw, following rio.

russ



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

* Re: [9fans] ttf2subf
  2006-03-23  4:36 ` Russ Cox
  2006-03-23  7:58   ` Bruce Ellis
@ 2006-03-23 11:38   ` erik quanstrom
  2006-03-23 14:32     ` Russ Cox
  1 sibling, 1 reply; 27+ messages in thread
From: erik quanstrom @ 2006-03-23 11:38 UTC (permalink / raw)
  To: 9fans, Russ Cox

9term and acme also use libframe.

- erik

"Russ Cox" <rsc@swtch.com> writes

|
| > /home/quanstro/cvs/plan9/ /usr/local/plan9/src/libframe/frdraw.c:14,20 - frdraw.c:14,20
| >   	for(nb=0,b=f->box; nb<f->nbox; nb++, b++){
| >   		_frcklinewrap(f, &pt, b);
| >   		if(!f->noredraw && b->nrune >= 0)
| > - 			string(f->b, pt, f->cols[TEXT], ZP, f->font, (char *)b->ptr);
| > + 			stringbg(f->b, pt, f->cols[TEXT], ZP, f->font, (char *)b->ptr, display->white, ZP);
| >   		pt.x += b->wid;
| >   	}
| >   }
|
| who says the background is white?
| frinsert, the only caller of _frredraw in the library,
| does appear to draw the background first, at least
| the beginning of it.
|
| > /home/quanstro/cvs/plan9//src/libframe/frdraw.c:99,105 - frdraw.c:99,105
| >   			x = f->r.max.x;
| >   		draw(f->b, Rect(pt.x, pt.y, x, pt.y+f->font->height), back, nil, pt);
| >   		if(b->nrune >= 0)
| > - 			stringn(f->b, pt, text, ZP, f->font, ptr, nr);
| > + 			stringnbg(f->b, pt, text, ZP, f->font, ptr, nr, display->white, ZP);
| >   		pt.x += w;
| >   	    Continue:
| >   		b++;
|
| this one shouldn't be necessary.  the draw call above
| just drew the background, which again might not be white.
|
| the right fix is to edit 9term's wrepaint.  it should draw
| the background before calling _frredraw.
|
| it's possible that frinsert needs to be edited a little
| too, to make sure only to _frredraw the part whose
| background it just filled in with frselectpaint.
|
| i leave all this as an exercise to the interested reader.
|
| russ


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

* Re: [9fans] ttf2subf
  2006-03-23  2:38 ` Russ Cox
  2006-03-23  2:52   ` geoff
@ 2006-03-23 10:40   ` Arvindh Rajesh Tamilmani
  1 sibling, 0 replies; 27+ messages in thread
From: Arvindh Rajesh Tamilmani @ 2006-03-23 10:40 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

> > all this is true, but i don't know of any bitmap fonts with good
> > unicode coverage.
>
> /lib/font/bit/lucm/unicode.9.font ?

Indic glyphs are missing.
Of course Indic support in Unicode is complicated anyway:
http://www.cl.cam.ac.uk/~mgk25/ucs-fonts.html#indic

I am trying out Tamil support in Plan 9 using TUNE.
http://www.tunerfc.tn.gov.in/TUNE-an_introduction.htm

TUNE is a new encoding with its own problems - but atleast I don't
have to worry about glyph reordering and ligatures.  It maps each
Tamil character to one code point.

Arvindh


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

* Re: [9fans] ttf2subf
  2006-03-23  2:27 ` Latchesar Ionkov
@ 2006-03-23 10:18   ` Charles Forsyth
  0 siblings, 0 replies; 27+ messages in thread
From: Charles Forsyth @ 2006-03-23 10:18 UTC (permalink / raw)
  To: 9fans

> You can ignore the subpixel mode -- libdraw doesn't support it.

i'd just ignore the subpixel mode and stop there.



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

* Re: [9fans] ttf2subf
  2006-03-23  4:36 ` Russ Cox
@ 2006-03-23  7:58   ` Bruce Ellis
  2006-03-23 11:38   ` erik quanstrom
  1 sibling, 0 replies; 27+ messages in thread
From: Bruce Ellis @ 2006-03-23  7:58 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

i wrote a ttf renderer in limbo.  worked good on well designed fonts and
the others just look shitty at say 9 point.

it's a bit like html though in that fonts are often malformed and you
have to cope with the mistakes.

brucee

On 3/23/06, Russ Cox <rsc@swtch.com> wrote:
> > /home/quanstro/cvs/plan9/ /usr/local/plan9/src/libframe/frdraw.c:14,20 - frdraw.c:14,20
> >       for(nb=0,b=f->box; nb<f->nbox; nb++, b++){
> >               _frcklinewrap(f, &pt, b);
> >               if(!f->noredraw && b->nrune >= 0)
> > -                     string(f->b, pt, f->cols[TEXT], ZP, f->font, (char *)b->ptr);
> > +                     stringbg(f->b, pt, f->cols[TEXT], ZP, f->font, (char *)b->ptr, display->white, ZP);
> >               pt.x += b->wid;
> >       }
> >   }
>
> who says the background is white?
> frinsert, the only caller of _frredraw in the library,
> does appear to draw the background first, at least
> the beginning of it.
>
> > /home/quanstro/cvs/plan9//src/libframe/frdraw.c:99,105 - frdraw.c:99,105
> >                       x = f->r.max.x;
> >               draw(f->b, Rect(pt.x, pt.y, x, pt.y+f->font->height), back, nil, pt);
> >               if(b->nrune >= 0)
> > -                     stringn(f->b, pt, text, ZP, f->font, ptr, nr);
> > +                     stringnbg(f->b, pt, text, ZP, f->font, ptr, nr, display->white, ZP);
> >               pt.x += w;
> >           Continue:
> >               b++;
>
> this one shouldn't be necessary.  the draw call above
> just drew the background, which again might not be white.
>
> the right fix is to edit 9term's wrepaint.  it should draw
> the background before calling _frredraw.
>
> it's possible that frinsert needs to be edited a little
> too, to make sure only to _frredraw the part whose
> background it just filled in with frselectpaint.
>
> i leave all this as an exercise to the interested reader.
>
> russ
>
>


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

* Re: [9fans] ttf2subf
  2006-03-23  3:57 erik quanstrom
@ 2006-03-23  4:36 ` Russ Cox
  2006-03-23  7:58   ` Bruce Ellis
  2006-03-23 11:38   ` erik quanstrom
  0 siblings, 2 replies; 27+ messages in thread
From: Russ Cox @ 2006-03-23  4:36 UTC (permalink / raw)
  To: 9fans

> /home/quanstro/cvs/plan9/ /usr/local/plan9/src/libframe/frdraw.c:14,20 - frdraw.c:14,20
>   	for(nb=0,b=f->box; nb<f->nbox; nb++, b++){
>   		_frcklinewrap(f, &pt, b);
>   		if(!f->noredraw && b->nrune >= 0)
> - 			string(f->b, pt, f->cols[TEXT], ZP, f->font, (char *)b->ptr);
> + 			stringbg(f->b, pt, f->cols[TEXT], ZP, f->font, (char *)b->ptr, display->white, ZP);
>   		pt.x += b->wid;
>   	}
>   }

who says the background is white?
frinsert, the only caller of _frredraw in the library,
does appear to draw the background first, at least
the beginning of it.

> /home/quanstro/cvs/plan9//src/libframe/frdraw.c:99,105 - frdraw.c:99,105
>   			x = f->r.max.x;
>   		draw(f->b, Rect(pt.x, pt.y, x, pt.y+f->font->height), back, nil, pt);
>   		if(b->nrune >= 0)
> - 			stringn(f->b, pt, text, ZP, f->font, ptr, nr);
> + 			stringnbg(f->b, pt, text, ZP, f->font, ptr, nr, display->white, ZP);
>   		pt.x += w;
>   	    Continue:
>   		b++;

this one shouldn't be necessary.  the draw call above
just drew the background, which again might not be white.

the right fix is to edit 9term's wrepaint.  it should draw
the background before calling _frredraw.

it's possible that frinsert needs to be edited a little
too, to make sure only to _frredraw the part whose
background it just filled in with frselectpaint.

i leave all this as an exercise to the interested reader.

russ



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

* Re: [9fans] ttf2subf
  2006-03-23  2:34 erik quanstrom
@ 2006-03-23  4:31 ` Latchesar Ionkov
  0 siblings, 0 replies; 27+ messages in thread
From: Latchesar Ionkov @ 2006-03-23  4:31 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

You can generate fonts in subpixel mode, but they are not much different
than the greyscale ones created by antialias. The reason is that when a
color image is specified as a mask in libdraw, it converts it to greyscale
and applies the resulting mask to every color channel.

Thanks,
	Lucho

On Wed, Mar 22, 2006 at 08:34:57PM -0600, erik quanstrom said:
> not true (at least on p9p):
>
> 	; for(i in 10 12 16) ttf2subf -f *.ttf -s $i -n dolous -m subpixel -r rgb
> 	; font=`{pwd}^/dolous/dolous.16.font 9term
>
> - erik
>
> On Wed Mar 22 20:27:43 CST 2006, lucho@gmx.net wrote:
> > You can ignore the subpixel mode -- libdraw doesn't support it.
> >
> > Thanks,
> > 	Lucho
> >
> > On Wed, Mar 22, 2006 at 08:03:29PM -0600, erik quanstrom said:
> > > i've been using a version that makes an attempt to generate as few subfonts as possible.
> > > the last time i goggled ttf2subf the website located was down.
> > >
> > > i've been working with code2000, which looks hideous in mono mode, but is pretty readable
> > > subpixel or antialias mode, but ttf2subf is too agressive in its antialiasing and does not snap
> > > near-grid vertical or horizontal lines to the grid.
> > >
> > > i cleaned up the code a bit and think that in subpixel mode, it generates non-grey
> > > pixels. that is pixels like
> > >
> > > 	char a,b,c;
> > >
> > > 	(a<<24) | (b<<16) | (c<<8) | 0xff	where a, b, c are not all equal.
> > >
> > > but i have not yet come up with a good solution to either issue.
> > >
> > > - erik
> > >
> > > On Wed Mar 22 18:51:46 CST 2006, mirtchovski@gmail.com wrote:
> > > > i did for a while and you can find the latest source on sources or on
> > > > the web. i heard there's another ttf2subf which gets better results
> > > > generating less subfonts (which is what i worked last on, and i think
> > > > i made reasonable success). i have no idea whether the other one has
> > > > made it out.
> > > >
> > > > On 3/22/06, erik quanstrom <quanstro@quanstro.net> wrote:
> > > > > has anybody been working on this program? (it converts truetype fonts
> > > > > to plan9 subfonts by using freefont.)
> > > > >
> > > > > - erik
> > > > >
> >


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

* Re: [9fans] ttf2subf
@ 2006-03-23  3:57 erik quanstrom
  2006-03-23  4:36 ` Russ Cox
  0 siblings, 1 reply; 27+ messages in thread
From: erik quanstrom @ 2006-03-23  3:57 UTC (permalink / raw)
  To: 9fans

here's a diff that will make libframe play nicely with greyscale fonts:

frdraw.c 	different
/home/quanstro/cvs/plan9//src/libframe/frdraw.c:14,20 - frdraw.c:14,20
  	for(nb=0,b=f->box; nb<f->nbox; nb++, b++){
  		_frcklinewrap(f, &pt, b);
  		if(!f->noredraw && b->nrune >= 0)
- 			string(f->b, pt, f->cols[TEXT], ZP, f->font, (char *)b->ptr);
+ 			stringbg(f->b, pt, f->cols[TEXT], ZP, f->font, (char *)b->ptr, display->white, ZP);
  		pt.x += b->wid;
  	}
  }
/home/quanstro/cvs/plan9//src/libframe/frdraw.c:99,105 - frdraw.c:99,105
  			x = f->r.max.x;
  		draw(f->b, Rect(pt.x, pt.y, x, pt.y+f->font->height), back, nil, pt);
  		if(b->nrune >= 0)
- 			stringn(f->b, pt, text, ZP, f->font, ptr, nr);
+ 			stringnbg(f->b, pt, text, ZP, f->font, ptr, nr, display->white, ZP);
  		pt.x += w;
  	    Continue:
  		b++;


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

* Re: [9fans] ttf2subf
  2006-03-23  3:20 erik quanstrom
@ 2006-03-23  3:33 ` Russ Cox
  0 siblings, 0 replies; 27+ messages in thread
From: Russ Cox @ 2006-03-23  3:33 UTC (permalink / raw)
  To: 9fans

> pardon my density, but i didn't see where the font is made translucent.
> where is this done?

fonts are treated as masks through which to draw the source image.
greyscale fonts are translucent masks.

russ



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

* Re: [9fans] ttf2subf
@ 2006-03-23  3:20 erik quanstrom
  2006-03-23  3:33 ` Russ Cox
  0 siblings, 1 reply; 27+ messages in thread
From: erik quanstrom @ 2006-03-23  3:20 UTC (permalink / raw)
  To: 9fans

pardon my density, but i didn't see where the font is made translucent.
where is this done?

- erik

On Wed Mar 22 20:57:49 CST 2006, rsc@swtch.com wrote:
> > does anyone know why a greyscale font will become monochrome
> > when redrawn. on p9p this is evident after <esc> <esc>?
>
> it's a translucent font.  you drew it twice so it got darker.
>
> presumably the color change should redraw the text with
> stringbg instead of just string.
>
> russ
>



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

* Re: [9fans] ttf2subf
  2006-03-23  3:00     ` andrey mirtchovski
@ 2006-03-23  3:06       ` andrey mirtchovski
  0 siblings, 0 replies; 27+ messages in thread
From: andrey mirtchovski @ 2006-03-23  3:06 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

forgot code2000, arguably the most complete shareware unicode font:

http://home.att.net/~jameskass/code2000_page.htm


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

* Re: [9fans] ttf2subf
  2006-03-23  2:52   ` geoff
@ 2006-03-23  3:00     ` andrey mirtchovski
  2006-03-23  3:06       ` andrey mirtchovski
  0 siblings, 1 reply; 27+ messages in thread
From: andrey mirtchovski @ 2006-03-23  3:00 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

efont has a decent unicode coverage: http://openlab.jp/efont/unicode/list.html

of course you can always "borrow" the arial unicode ttf from any
windows box you own, and there's the Cyberbit ttf still linked to on
netscape's ftp site somewhere.


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

* Re: [9fans] ttf2subf
  2006-03-23  2:51 erik quanstrom
@ 2006-03-23  2:57 ` Russ Cox
  0 siblings, 0 replies; 27+ messages in thread
From: Russ Cox @ 2006-03-23  2:57 UTC (permalink / raw)
  To: 9fans

> does anyone know why a greyscale font will become monochrome
> when redrawn. on p9p this is evident after <esc> <esc>?

it's a translucent font.  you drew it twice so it got darker.

presumably the color change should redraw the text with
stringbg instead of just string.

russ



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

* Re: [9fans] ttf2subf
  2006-03-23  2:38 ` Russ Cox
@ 2006-03-23  2:52   ` geoff
  2006-03-23  3:00     ` andrey mirtchovski
  2006-03-23 10:40   ` Arvindh Rajesh Tamilmani
  1 sibling, 1 reply; 27+ messages in thread
From: geoff @ 2006-03-23  2:52 UTC (permalink / raw)
  To: 9fans

Even /lib/font/bit/lucm/unicode.9.font has good but not perfect
coverage.  I've stumbled over occasional missing glyphs.  Some
alphabets are missing (I'll have to look later to find out which) and
some non-letters too.  Here's are some examples:

; uniquery check
2447 ⑇
2611 ☑
2713 ✓
2714 ✔
; uniquery slash
2044 ⁄
20e0 ⃠
2215 ∕
2298 ⊘
233f ⌿
2340 ⍀
2341 ⍁
2342 ⍂
2349 ⍉
244a ⑊
; uniquery point
00ab «
00bb »
05b0 ְ
05b1 ֱ
05b2 ֲ
05b3 ֳ
05b4 ִ
05b5 ֵ
05b6 ֶ
05b7 ַ
05b8 ָ
05b9 ֹ
05bb ֻ
05bc ּ
05bd ֽ
05bf ֿ
05c1 ׁ
05c2 ׂ
066d ٭
2027 ‧
2039 ‹
203a ›
2041 ⁁
2329 〈
232a 〉
25b2 ▲
25b3 △
25b4 ▴
25b5 ▵
25b6 ▶
25b7 ▷
25b8 ▸
25b9 ▹
25ba ►
25bb ▻
25bc ▼
25bd ▽
25be ▾
25bf ▿
25c0 ◀
25c1 ◁
25c2 ◂
25c3 ◃
25c4 ◄
25c5 ◅
25ec ◬
25ed ◭
25ee ◮
261a ☚
261b ☛
261c ☜
261d ☝
261e ☞
261f ☟
2726 ✦
2727 ✧
2734 ✴
2735 ✵
2736 ✶
2737 ✷
2738 ✸
2739 ✹
273a ✺
2742 ❂
279b ➛
27a8 ➨
333d ㌽
fb1e ﬞ
; cat /bin/uniquery
#!/bin/rc
# uniquery pattern... - print hex & glyph of any chars matching pattern
#	in /lib/unicode
sts=''
for (pat) {
	hexes = `{grep $pat /lib/unicode | column 1}
	if (~ $#hexes 0) {
		echo $0: no such unicode chars: $pat >[1=2]
		sts='no such chars'
	}
	if not
		for (hex in $hexes)
			unicode $hex-$hex
}
exit $sts



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

* Re: [9fans] ttf2subf
@ 2006-03-23  2:51 erik quanstrom
  2006-03-23  2:57 ` Russ Cox
  0 siblings, 1 reply; 27+ messages in thread
From: erik quanstrom @ 2006-03-23  2:51 UTC (permalink / raw)
  To: 9fans

i find these fonts hard to read.

i've been using code2000 converted by ttf2subf. the results are not perfect,
but it looks pretty good to me. also it has better coverage. it's so annoying to
pjb faces instead of someone's name. even if it is spam.

does anyone know why a greyscale font will become monochrome
when redrawn. on p9p this is evident after <esc> <esc>?

- erik

On Wed Mar 22 20:37:59 CST 2006, mirtchovski@gmail.com wrote:
> The fixed/ fonts Russ talks about are identical to Markus Kuhn's 10646
> fonts available here:
>
> http://www.cl.cam.ac.uk/~mgk25/ucs-fonts.html
>
> they cover a substantial set of unicode characters. what characters do
> you need that aren't there?


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

* Re: [9fans] ttf2subf
  2006-03-23  2:29 erik quanstrom
  2006-03-23  2:35 ` andrey mirtchovski
@ 2006-03-23  2:38 ` Russ Cox
  2006-03-23  2:52   ` geoff
  2006-03-23 10:40   ` Arvindh Rajesh Tamilmani
  1 sibling, 2 replies; 27+ messages in thread
From: Russ Cox @ 2006-03-23  2:38 UTC (permalink / raw)
  To: 9fans

> all this is true, but i don't know of any bitmap fonts with good
> unicode coverage.

/lib/font/bit/lucm/unicode.9.font ?



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

* Re: [9fans] ttf2subf
  2006-03-23  2:29 erik quanstrom
@ 2006-03-23  2:35 ` andrey mirtchovski
  2006-03-23  2:38 ` Russ Cox
  1 sibling, 0 replies; 27+ messages in thread
From: andrey mirtchovski @ 2006-03-23  2:35 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

The fixed/ fonts Russ talks about are identical to Markus Kuhn's 10646
fonts available here:

http://www.cl.cam.ac.uk/~mgk25/ucs-fonts.html

they cover a substantial set of unicode characters. what characters do
you need that aren't there?


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

* Re: [9fans] ttf2subf
@ 2006-03-23  2:34 erik quanstrom
  2006-03-23  4:31 ` Latchesar Ionkov
  0 siblings, 1 reply; 27+ messages in thread
From: erik quanstrom @ 2006-03-23  2:34 UTC (permalink / raw)
  To: 9fans

not true (at least on p9p):

	; for(i in 10 12 16) ttf2subf -f *.ttf -s $i -n dolous -m subpixel -r rgb
	; font=`{pwd}^/dolous/dolous.16.font 9term

- erik

On Wed Mar 22 20:27:43 CST 2006, lucho@gmx.net wrote:
> You can ignore the subpixel mode -- libdraw doesn't support it.
>
> Thanks,
> 	Lucho
>
> On Wed, Mar 22, 2006 at 08:03:29PM -0600, erik quanstrom said:
> > i've been using a version that makes an attempt to generate as few subfonts as possible.
> > the last time i goggled ttf2subf the website located was down.
> >
> > i've been working with code2000, which looks hideous in mono mode, but is pretty readable
> > subpixel or antialias mode, but ttf2subf is too agressive in its antialiasing and does not snap
> > near-grid vertical or horizontal lines to the grid.
> >
> > i cleaned up the code a bit and think that in subpixel mode, it generates non-grey
> > pixels. that is pixels like
> >
> > 	char a,b,c;
> >
> > 	(a<<24) | (b<<16) | (c<<8) | 0xff	where a, b, c are not all equal.
> >
> > but i have not yet come up with a good solution to either issue.
> >
> > - erik
> >
> > On Wed Mar 22 18:51:46 CST 2006, mirtchovski@gmail.com wrote:
> > > i did for a while and you can find the latest source on sources or on
> > > the web. i heard there's another ttf2subf which gets better results
> > > generating less subfonts (which is what i worked last on, and i think
> > > i made reasonable success). i have no idea whether the other one has
> > > made it out.
> > >
> > > On 3/22/06, erik quanstrom <quanstro@quanstro.net> wrote:
> > > > has anybody been working on this program? (it converts truetype fonts
> > > > to plan9 subfonts by using freefont.)
> > > >
> > > > - erik
> > > >
>


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

* Re: [9fans] ttf2subf
  2006-03-23  2:25   ` Russ Cox
@ 2006-03-23  2:33     ` Latchesar Ionkov
  0 siblings, 0 replies; 27+ messages in thread
From: Latchesar Ionkov @ 2006-03-23  2:33 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

I think the magic most ttf fonts use to look good on screen is embedding
bitmap fonts for the small sizes.

Thanks,
	Lucho

On Wed, Mar 22, 2006 at 09:25:39PM -0500, Russ Cox said:
> > i did for a while and you can find the latest source on sources or on
> > the web. i heard there's another ttf2subf which gets better results
> > generating less subfonts (which is what i worked last on, and i think
> > i made reasonable success). i have no idea whether the other one has
> > made it out.
>
> the program that generates fewer subfonts is one that
> rob wrote and starts with bdf, not ttf.
>
> generating screen fonts from ttf is basically not a good idea.
> they're going to be ugly at the low resolutions unless they
> were explicitly designed to double as screen fonts.  the only
> examples i know of in that camp are verdana and georgia,
> but i'm not sure that the magic ttf goo that encodes how to
> make them look good at small resolutions is known to libfreetype.
> http://www.will-harris.com/verdana-georgia.htm
>
> you're much better off finding fonts that were designed as
> real bitmap fonts from the start.  any of apple's early bitmap
> fonts would fit this category too, but i'm sure they're not
> available for general use.
>
> all that said, we've got a collection of very nice fonts - the pelm,
> lucm, and lucida bitmaps - i'd stick to those.  if you must, there's
> always the x11 fixed-width fonts (/lib/font/bit/fixed).
>
> russ


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

* Re: [9fans] ttf2subf
@ 2006-03-23  2:29 erik quanstrom
  2006-03-23  2:35 ` andrey mirtchovski
  2006-03-23  2:38 ` Russ Cox
  0 siblings, 2 replies; 27+ messages in thread
From: erik quanstrom @ 2006-03-23  2:29 UTC (permalink / raw)
  To: 9fans

all this is true, but i don't know of any bitmap fonts with good
unicode coverage.

the freetype library does know how to decode the bitmaps and
hints encoded ttf fonts.

- erik

On Wed Mar 22 20:26:07 CST 2006, rsc@swtch.com wrote:
> generating screen fonts from ttf is basically not a good idea.
> they're going to be ugly at the low resolutions unless they
> were explicitly designed to double as screen fonts.  the only
> examples i know of in that camp are verdana and georgia,
> but i'm not sure that the magic ttf goo that encodes how to
> make them look good at small resolutions is known to libfreetype.
> http://www.will-harris.com/verdana-georgia.htm
>
> you're much better off finding fonts that were designed as
> real bitmap fonts from the start.  any of apple's early bitmap
> fonts would fit this category too, but i'm sure they're not
> available for general use.
>
> all that said, we've got a collection of very nice fonts - the pelm,
> lucm, and lucida bitmaps - i'd stick to those.  if you must, there's
> always the x11 fixed-width fonts (/lib/font/bit/fixed).
>
> russ
>


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

* Re: [9fans] ttf2subf
  2006-03-23  2:03 erik quanstrom
@ 2006-03-23  2:27 ` Latchesar Ionkov
  2006-03-23 10:18   ` Charles Forsyth
  2006-03-23 21:38 ` Tim Wiess
  1 sibling, 1 reply; 27+ messages in thread
From: Latchesar Ionkov @ 2006-03-23  2:27 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

You can ignore the subpixel mode -- libdraw doesn't support it.

Thanks,
	Lucho

On Wed, Mar 22, 2006 at 08:03:29PM -0600, erik quanstrom said:
> i've been using a version that makes an attempt to generate as few subfonts as possible.
> the last time i goggled ttf2subf the website located was down.
>
> i've been working with code2000, which looks hideous in mono mode, but is pretty readable
> subpixel or antialias mode, but ttf2subf is too agressive in its antialiasing and does not snap
> near-grid vertical or horizontal lines to the grid.
>
> i cleaned up the code a bit and think that in subpixel mode, it generates non-grey
> pixels. that is pixels like
>
> 	char a,b,c;
>
> 	(a<<24) | (b<<16) | (c<<8) | 0xff	where a, b, c are not all equal.
>
> but i have not yet come up with a good solution to either issue.
>
> - erik
>
> On Wed Mar 22 18:51:46 CST 2006, mirtchovski@gmail.com wrote:
> > i did for a while and you can find the latest source on sources or on
> > the web. i heard there's another ttf2subf which gets better results
> > generating less subfonts (which is what i worked last on, and i think
> > i made reasonable success). i have no idea whether the other one has
> > made it out.
> >
> > On 3/22/06, erik quanstrom <quanstro@quanstro.net> wrote:
> > > has anybody been working on this program? (it converts truetype fonts
> > > to plan9 subfonts by using freefont.)
> > >
> > > - erik
> > >



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

* Re: [9fans] ttf2subf
  2006-03-23  0:45 ` andrey mirtchovski
@ 2006-03-23  2:25   ` Russ Cox
  2006-03-23  2:33     ` Latchesar Ionkov
  0 siblings, 1 reply; 27+ messages in thread
From: Russ Cox @ 2006-03-23  2:25 UTC (permalink / raw)
  To: 9fans

> i did for a while and you can find the latest source on sources or on
> the web. i heard there's another ttf2subf which gets better results
> generating less subfonts (which is what i worked last on, and i think
> i made reasonable success). i have no idea whether the other one has
> made it out.

the program that generates fewer subfonts is one that
rob wrote and starts with bdf, not ttf.

generating screen fonts from ttf is basically not a good idea.
they're going to be ugly at the low resolutions unless they
were explicitly designed to double as screen fonts.  the only
examples i know of in that camp are verdana and georgia,
but i'm not sure that the magic ttf goo that encodes how to
make them look good at small resolutions is known to libfreetype.
http://www.will-harris.com/verdana-georgia.htm

you're much better off finding fonts that were designed as
real bitmap fonts from the start.  any of apple's early bitmap
fonts would fit this category too, but i'm sure they're not
available for general use.

all that said, we've got a collection of very nice fonts - the pelm,
lucm, and lucida bitmaps - i'd stick to those.  if you must, there's
always the x11 fixed-width fonts (/lib/font/bit/fixed).

russ



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

* Re: [9fans] ttf2subf
@ 2006-03-23  2:03 erik quanstrom
  2006-03-23  2:27 ` Latchesar Ionkov
  2006-03-23 21:38 ` Tim Wiess
  0 siblings, 2 replies; 27+ messages in thread
From: erik quanstrom @ 2006-03-23  2:03 UTC (permalink / raw)
  To: 9fans

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

i've been using a version that makes an attempt to generate as few subfonts as possible.
the last time i goggled ttf2subf the website located was down.

i've been working with code2000, which looks hideous in mono mode, but is pretty readable
subpixel or antialias mode, but ttf2subf is too agressive in its antialiasing and does not snap
near-grid vertical or horizontal lines to the grid.

i cleaned up the code a bit and think that in subpixel mode, it generates non-grey
pixels. that is pixels like

	char a,b,c;

	(a<<24) | (b<<16) | (c<<8) | 0xff	where a, b, c are not all equal.

but i have not yet come up with a good solution to either issue.

- erik

On Wed Mar 22 18:51:46 CST 2006, mirtchovski@gmail.com wrote:
> i did for a while and you can find the latest source on sources or on
> the web. i heard there's another ttf2subf which gets better results
> generating less subfonts (which is what i worked last on, and i think
> i made reasonable success). i have no idea whether the other one has
> made it out.
>
> On 3/22/06, erik quanstrom <quanstro@quanstro.net> wrote:
> > has anybody been working on this program? (it converts truetype fonts
> > to plan9 subfonts by using freefont.)
> >
> > - erik
> >

[-- Attachment #2.1: Type: text/plain, Size: 336 bytes --]

from postmaster@ethel:
The following attachment had content that we can't
prove to be harmless.  To avoid possible automatic
execution, we changed the content headers.
The original header was:

	Content-Type: application/octet-stream
	Content-Disposition: attachment; filename=ttf2subf.tar.bz2
	Content-Transfer-Encoding: base64

[-- Attachment #2.2: ttf2subf.tar.bz2.suspect --]
[-- Type: application/octet-stream, Size: 4895 bytes --]

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

* Re: [9fans] ttf2subf
  2006-03-23  0:12 erik quanstrom
@ 2006-03-23  0:45 ` andrey mirtchovski
  2006-03-23  2:25   ` Russ Cox
  0 siblings, 1 reply; 27+ messages in thread
From: andrey mirtchovski @ 2006-03-23  0:45 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

i did for a while and you can find the latest source on sources or on
the web. i heard there's another ttf2subf which gets better results
generating less subfonts (which is what i worked last on, and i think
i made reasonable success). i have no idea whether the other one has
made it out.

On 3/22/06, erik quanstrom <quanstro@quanstro.net> wrote:
> has anybody been working on this program? (it converts truetype fonts
> to plan9 subfonts by using freefont.)
>
> - erik
>


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

* [9fans] ttf2subf
@ 2006-03-23  0:12 erik quanstrom
  2006-03-23  0:45 ` andrey mirtchovski
  0 siblings, 1 reply; 27+ messages in thread
From: erik quanstrom @ 2006-03-23  0:12 UTC (permalink / raw)
  To: 9fans

has anybody been working on this program? (it converts truetype fonts
to plan9 subfonts by using freefont.)

- erik


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

end of thread, other threads:[~2006-03-23 21:38 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-05-05  3:06 [9fans] ttf2subf andrey mirtchovski
2006-03-23  0:12 erik quanstrom
2006-03-23  0:45 ` andrey mirtchovski
2006-03-23  2:25   ` Russ Cox
2006-03-23  2:33     ` Latchesar Ionkov
2006-03-23  2:03 erik quanstrom
2006-03-23  2:27 ` Latchesar Ionkov
2006-03-23 10:18   ` Charles Forsyth
2006-03-23 21:38 ` Tim Wiess
2006-03-23  2:29 erik quanstrom
2006-03-23  2:35 ` andrey mirtchovski
2006-03-23  2:38 ` Russ Cox
2006-03-23  2:52   ` geoff
2006-03-23  3:00     ` andrey mirtchovski
2006-03-23  3:06       ` andrey mirtchovski
2006-03-23 10:40   ` Arvindh Rajesh Tamilmani
2006-03-23  2:34 erik quanstrom
2006-03-23  4:31 ` Latchesar Ionkov
2006-03-23  2:51 erik quanstrom
2006-03-23  2:57 ` Russ Cox
2006-03-23  3:20 erik quanstrom
2006-03-23  3:33 ` Russ Cox
2006-03-23  3:57 erik quanstrom
2006-03-23  4:36 ` Russ Cox
2006-03-23  7:58   ` Bruce Ellis
2006-03-23 11:38   ` erik quanstrom
2006-03-23 14:32     ` Russ Cox

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