Darren, as Jon correctly put it, large (or huge :) fonts are an unresolved problem. i managed to reduce memory usage somewhat (check out the 0.2.11.3 prerelease if you like), and actually managed to import kochi-mincho-subst. it still consumed ~1.6GB of memory, obviously became very slow due to swapping, but after a while, finished the import. the resulting SWF was only about 4MB.
this is only a slight optimization. without wanting to promise too much, i'll look into another workaround to make importing fonts more memory-efficient (yes, it's embarrassing now :). this is in fact a corner case which we didnt think would really do much harm when i, in early swfmill times, decided that loading the whole swf into memory would be fine. now this is biting us, as the font, with the current architecture, is not only loaded into memory completely as swfmill (C++) objects, but then transformed to an in-memory XML DOM, copied with XSLT, then made swfmill objects again and finally written to SWF. sadly, there's not really any nice way to solve this problem except redesigning swfmill's core functionality to work in a streamable way, which is something i have been wanting to do for a while but did not get round to yet, and it will likely take quite some more time still.. so the current situation is indeed that swfmill consumes ridiculous amounts of memory for such large fonts (or in fact any large SWFs), making it factually unviable to import them. OTOH, you could get lucky with the prerelease and a lot of RAM in the machine. it's not really some endless loop consuming more and more, it's just hell of a lot of memory in use :( and again, i have an idea for another workaround to make it use only a few hundred MB for mincho or so. but i dont know yet if it'll work, and the problem will persist if you'd do things like importing the produced SWFs into new ones with swfml-simple. and, as motivation, would you care to give some hints on why you actually need *all* characters of such large fonts? -dan Darren Cook <[EMAIL PROTECTED]> (on Thu, 30 Mar 2006 11:45:07 +0900): > The subject may be a tongue-twister, but the bug was a machine-buster. > On linux I tried using swfmill with this: > <font id="mytestfont" > import="/usr/share/fonts/japanese/TrueType/kochi-mincho-subst.ttf" /> > > That ttf font is 8MB. > > This caused swfmill to quickly grab all available memory, and all > available swap space, totaling 1.5Gb. It didn't give any error messages, > and didn't make any files as far as I could see. (It ran for about 15 > minutes before I managed to kill it, so it didn't run to completion; it > had used about 60 seconds of CPU so it was actually doing something in > addition to just thrashing the disk.) > > If other people aren't seeing this could you let me know your > xml/font/OS and I will try and narrow down the problem. > > Darren > > P.S. The biggest font I will need to embed is 22.1MB. -- http://0xDF.com/ http://iterative.org/ _______________________________________________ swfmill mailing list swfmill@osflash.org http://osflash.org/mailman/listinfo/swfmill_osflash.org