Skip Menu |
 

This queue is for tickets about the Font-TTF CPAN distribution.

Report information
The Basics
Id: 124190
Status: stalled
Priority: 0/
Queue: Font-TTF

People
Owner: Nobody in particular
Requestors: TPLA [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: GPOS parsing runs out of memory
My application needs to read the GPOS table when building a map from fonts found in the Windows Fonts directory. Windows 7 comes stock with a font named 'Mangal'. This font (and only this one) triggers an out of memory condition. use Font::TTF::Font; my $fontfile = $ARGV[0] || "c:/windows/fonts/Mangal.ttf"; my $f = Font::TTF::Font->open($fontfile) || die "error opening TrueType font '$fontfile'.\n"; $f->{GPOS}->read if(exists $f->{GPOS}); I can't suggest a fix, but I narrowed the problem down to read_delta() in GPOS.pm. When I comment out this part of read_value(): foreach $s (qw(XPlaDevice YPlaDevice XAdvDevice YAdvDevice)) { if ($fmt & $flag) { $res->{$s} = $self->read_delta(TTF_Unpack('S', substr($dat, $i++ << 1, 2)), $base, $lookup, $fh); } $flag <<= 1; } perl (v5.22.1 MSWin32-x64-multi-thread) finishes OK. No font in a stock Windows 10 triggers the problem, but then, Mangal doesn't seem to be included any more. I didn't assign a severity but then, it's a show stopper nevertheless.
Download (untitled) / with headers
text/plain 279b
Is this still causing a problem? I just tried it on Win10 with Perl 5.26 and the current Font::TTF, with Mangal.ttf copied over from Win7. No messages of any kind, and the program ended within a second or two. I presume that means no major problems (it didn't hang, in any case).
Download (untitled) / with headers
text/plain 213b
I can't duplicate the problem on Windows 10 using Strawberry Perl 5, version 26, subversion 0 (v5.26.0) built for MSWin32-x86-multi-thread-64int. Please confirm whether or not you are still having the problem.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.