X-Git-Url: http://git.imager.perl.org/imager.git/blobdiff_plain/20c297d4f58e5fcb594db56ea49dd008c72380e5..e1c0692925:/fontft1.c?ds=sidebyside diff --git a/fontft1.c b/fontft1.c index cf2043f7..50602902 100644 --- a/fontft1.c +++ b/fontft1.c @@ -613,7 +613,7 @@ i_tt_get_glyph( TT_Fonthandle *handle, int inst, unsigned long j) { if ( LTT_hinted ) load_flags |= TTLOAD_HINT_GLYPH; if ( !TT_VALID(handle->char_map) ) { - code = (j - ' ' + 1) < 0 ? 0 : (j - ' ' + 1); + code = (j < ' ' - 1) ? 0 : (j - (' ' - 1)); if ( code >= handle->properties.num_Glyphs ) code = 0; } else code = TT_Char_Index( handle->char_map, j ); @@ -687,7 +687,7 @@ i_tt_has_chars(TT_Fonthandle *handle, char const *text, size_t len, int utf8, index = TT_Char_Index(handle->char_map, c); } else { - index = (c - ' ' + 1) < 0 ? 0 : (c - ' ' + 1); + index = (c < ' ' - 1) ? 0 : (c - (' ' - 1)); if (index >= handle->properties.num_Glyphs) index = 0; }