> On Wed, Aug 08, 2007 at 09:46:06AM +0800, Harry Lin D332 (?????q) wrote:
> > Hi,
> >
> > I used the TTF font rasterizer to make more than 30000 pngs for Chinese 
> > font.
> >
> > http://linuxfromscratch.org/pipermail/links-list/2003-November/004302.html
> >
> > And after making Links, the size of the execution file is 114.3M ?K?K.
> >
> > I can??t run the program, as I run ./links, the process is killed 
> > instantly. :-(
> 
> You probably have set some limit on virtual memory or executable size in your
> system. Try to increase it. Use ulimit.
> 
> It shouldn't be a problem, those 114M just lie on the disk and are mapped into
> memory only on demand and then freed again. Shouldn't make difference if the
> fonts are mmap()ed or compiled into the binary like this.
> 
I run Links on embedded linux without swap, and the memory on board is only 
about 58MB. :(
> I just wonder how long the compilation of font_include.c took with 114MB of
> fonts :) Didn't your gcc explode? :)
The font_include.c is 317MB. After compiling, The font_include.o is about 
110-120MB.
When making Links, it cost more than 80% of system memory. 
I just wrote a script that sleeps to midnight and then make, so I don't know 
the actual time making Links with the more 30000 pngs.
> >
> >
> > So I want to render the texts by DrawString() instead of Blit() of the
> > DFBSurface API (directfb.c directfb_draw_bitmap() ), just drawing the texts
> > with a ttf font directly rather than bliting from the pngs
> 
> >
> > Is it realizable? Thanks.
> 
> Yes, but will it then run on OS/2 Pmshell, AtheOS GUI, FreeMint and other
> obscure operating systems I actually even never saw in my life? Maybe the font
> library doesn't compile on them.
> 
I just run Links on DirectFB. :p
> It will also be slower and/or uglier. To antialias properly you have to first
> draw in a huge resolution and then scale down. Any other algorithm IMHO
> produces incorrect results.
> 

I tried using DFB DrawGlyph() instead of draw_bitmap() in print_letter(), and 
the performance is really very very poor...
I think the reason may be that I create the font and then release it for every 
character; 
I'll try to reduce the times of font create()...
> Are these fonts under a licence compatible with GPL? It would be nice to add
> these PNG's into Links with some switch like --enable-chinese.
> 
The font is http://en.wikipedia.org/wiki/Arial_Unicode_MS,
I'm not sure if it is under a license compatible with GPL...

> CL<
> 
> _______________________________________________
> links-list mailing list
> links-list@linuxfromscratch.org
> http://linuxfromscratch.org/mailman/listinfo/links-list

_______________________________________________
links-list mailing list
links-list@linuxfromscratch.org
http://linuxfromscratch.org/mailman/listinfo/links-list

Reply via email to