- avoid dead code in i_get_anonymous_color_histo(), which is the
implementation of getcolorusage(). CID 185327.
+ - avoid dead code in i_ft2_glyph_name(), which is the implementation
+ of glyph_names() for FT2. CID 185342.
+
Imager 1.008 - 31 Dec 2018
============
+Imager-Font-FT2 0.95
+====================
+
+ - avoid dead code in i_ft2_glyph_name(), which is the implementation
+ of glyph_names(). CID 185342.
+
Imager-Font-FT2 0.94
====================
@ISA = qw(Imager::Font);
BEGIN {
- $VERSION = "0.95";
+ $VERSION = "0.96";
require XSLoader;
XSLoader::load('Imager::Font::FT2', $VERSION);
ch = *text++;
--len;
}
- EXTEND(SP, count+1);
+ EXTEND(SP, 1);
if (i_ft2_glyph_name(handle, ch, name, sizeof(name),
reliable_only)) {
- ST(count) = sv_2mortal(newSVpv(name, 0));
+ PUSHs(sv_2mortal(newSVpv(name, 0)));
}
else {
- ST(count) = &PL_sv_undef;
+ PUSHs(&PL_sv_undef);
}
- ++count;
}
- XSRETURN(count);
int
i_ft2_can_do_glyph_names()
#!perl -w
use strict;
-use Test::More tests => 204;
+use Test::More;
use Cwd qw(getcwd abs_path);
use Imager qw(:all);
my @names = $exfont->glyph_names(string=>$text,
utf8=>1, reliable_only=>0);
is($names[0], "hyphentwo", "check utf8 glyph name");
+
+ # make sure we get an empty list with bad utf8
+ my @bad = $exfont->glyph_names(string => "ab\xC0", utf8 => 1);
+ is(@bad, 0, "properly got empty result with bad utf8");
}
}
Imager->close_log();
+done_testing();
+
END {
unless ($ENV{IMAGER_KEEP_FILES}) {
unlink map "testout/$_", @test_output;