9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* 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  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, 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  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: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 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
* [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
* [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

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 --
2006-03-23  2:51 [9fans] ttf2subf erik quanstrom
2006-03-23  2:57 ` Russ Cox
  -- strict thread matches above, loose matches on Subject: below --
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
2006-03-23  3:20 erik quanstrom
2006-03-23  3:33 ` Russ Cox
2006-03-23  2:34 erik quanstrom
2006-03-23  4:31 ` Latchesar Ionkov
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: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  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
2005-05-05  3:06 andrey mirtchovski

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