- avoid dead code in i_ft2_glyph_name(), which is the implementation
of glyph_names() for FT2. CID 185342.
+ - avoid dead code in i_t1_glyph_names(), which is the implementation
+ of glyph_names() for T1. CID 185322.
+
- avoid an unneeded EXTEND() call when the FT2 has_chars()
implementation returns 0. CID 185292.
- adjust a pointer parameter from an array-style declaration with 6
elements to pointer style (since it hasn't been 6 for years.)
+ - avoid dead code in i_t1_glyph_names(), which is the implementation
+ of glyph_names() for T1. CID 185322.
+
Imager::Font::T1 1.024
======================
ch = *text++;
--len;
}
- EXTEND(SP, count+1);
+ EXTEND(SP, 1);
if (i_t1_glyph_name(font, ch, name, sizeof(name))) {
- 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_t1_CLONE_SKIP(...)
BOOT:
PERL_INITIALIZE_IMAGER_CALLBACKS;
- i_t1_start();
\ No newline at end of file
+ i_t1_start();
#$Imager::DEBUG=1;
-plan tests => 110;
-
ok($Imager::formats{t1}, "must have t1");
-d "testout" or mkdir "testout";
@glyph_names = $font->glyph_names(string=>$text, utf8=>1);
is($glyph_names[0], undef, "expect no glyph_name for \\x{20A1}");
+ my @bad = $font->glyph_names(string => "ab\xC0", utf8 => 1);
+ is(@bad, 0, "should be no results for bad utf8");
+
# make sure a missing string parameter is handled correctly
eval {
$font->glyph_names();
}
}
+done_testing();
#malloc_state();