[links-list] fonts fonts fonts .... why not draw them ?

Reinoud buzztoh at 13thmonkey.org
Thu Nov 14 06:05:11 PST 2002


Dear links addicts,

lots of mail on this list on fonts... the advantages for this, the 
advantages of that etc... all seem to kind of take the inclusion of 
hundreds of PNG files for granted.... I'll try to comment on various topics 
that came by :

On the subject why PNG's seem to be able to be compressed more: only the
image itself inside the PNG is compressed using libz with a compression
factor that can be set by the coder and a `filter' method that tries to
generate the best input for the libz to compress. I've seen `the gimp'
produce much larger PNG's for example than my PNG codec even though i still
haven't implemented the `max crunch' filters yet in my encoder. Its obvious
that the PNGs together can be crunced again to get a smaller file for all
the other blocks like palettes, descriptors, block headers etc. etc. are
not compressed and all theoretically have some form of redundancy in them
and can therefore be crunched again.

As to using bzip2, the libz also supports this kind of encoding; its all in
the encoder's view. If i tell the libz to flush all and restart afresh
after it crunced a certain amount of data when encoding, all libz's will
happily just follow it making it effectively bzip2. OK ... bzip2 might use
a different algorithm alltogether but the advantages of blocking is easily
done using libz too.

I've also hearded some comments on `why not use freetype2 ?/ Xfonts / ...'
... personally i dont like freetype2 that much allthough the output i've
seen is very reasonable to pretty good. The hard dependency on X is prolly
not wanted for it might run on a non X system :-D

Still... whats the problem with say embedding font definition files for a
few typically used fonts ? i.e. Latin encoded serif/non serif, cyrillics,
.... and render them to the requested fontsize either to the screen
directly or to the PNG font cache ? A fontrenderer doesn't have to be big
at all... I wrote a (soon to be released) fast Postscript compatible render
engine (with a GPL compatible licence) with Type1 and Risc-OS fonts support
that has a codesize foorprint of about 87 kb on StrongARM machines and even
just 95 kb on an Alpha machine.  (see http://www.13thmonkey.org/Artdraw for
the outdated website)

Given that a gzipped Courier type1 font definition is about 73 kb too its 
easy to see that it won't bloat at all....

Any ideas / comments ?

Cheers,
Reinoud
-- 
Unsubscribe: send email to links-list-request at linuxfromscratch.org
and put unsubscribe in the subject header of the message



More information about the links-list mailing list