shithub: freetype+ttf2subf

Download patch

ref: 3b45f564e94fde897c0e6e168c660a6e1ec5c679
parent: 64e26ad3a2ef2e07190b2027b113a6b3f6eb8b0d
author: Seigo Nonaka <nona@google.com>
date: Mon Nov 29 13:17:49 EST 2021

* src/base/ftobjs.c (FT_Request_Metrics): Fix build warning on Android.

Use casts since `FT_USHORT_MAX` is unsigned short in bionic (libc used in
Android).

git/fs: mount .git/fs: mount/attach disallowed
--- a/src/base/ftobjs.c
+++ b/src/base/ftobjs.c
@@ -3230,8 +3230,8 @@
 
       scaled_w = ( scaled_w + 32 ) >> 6;
       scaled_h = ( scaled_h + 32 ) >> 6;
-      if ( scaled_w > FT_USHORT_MAX ||
-           scaled_h > FT_USHORT_MAX )
+      if ( scaled_w > (FT_Long)FT_USHORT_MAX ||
+           scaled_h > (FT_Long)FT_USHORT_MAX )
       {
         FT_ERROR(( "FT_Request_Metrics: Resulting ppem size too large\n" ));
         error = FT_ERR( Invalid_Pixel_Size );