in reply to TrueType font gallery
'lo,
I had almost the same problem (could be because I kinda borrowed some of this code in one of my scripts ;) ). The problem seemed to be Font::TTF::Font, $n->release() did the trick.
Don't forget that in your example you change the original reference, so you don't have any method 'release' anymore (I forgot that initially).
This brought back memory usage from ~25mb (crash at 1020 fonts) to ~6mb (all my fonts, 1035).my $n = Font::TTF::Font->open($f) || $f; $tmp = $n->{name} || $f if ref $n; $tmp = $tmp->read->find_name(4) || $f if ref $n; $n->release() if ref $n;
december
PS: Where did you find the find_name(4) reference? I haven't found any documentation about the exact usage of find_name and the meaning of its $nid parameter...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: TrueType font gallery
by basje (Beadle) on Aug 09, 2005 at 20:43 UTC | |
|
Re: Re: TrueType font gallery
by Juerd (Abbot) on Jun 04, 2003 at 17:54 UTC | |
by december (Pilgrim) on Jun 04, 2003 at 18:12 UTC | |
by Juerd (Abbot) on Jun 04, 2003 at 18:46 UTC |