shithub: freetype+ttf2subf

Download patch

ref: 09948e426e95a486017913158a46ac570cc7a91a
parent: 4d406e39078dcc5ed23ebf039a21db0bc6b24403
author: Alexei Podtelezhnikov <[email protected]>
date: Wed Sep 9 17:30:15 EDT 2015

* src/base/ftcalc.c (FT_RoundFix): Improve.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2015-09-09  Alexei Podtelezhnikov  <[email protected]>
+
+	* src/base/ftcalc.c (FT_RoundFix): Improve.
+
 2015-09-09  Wojciech Mamrak  <[email protected]>
 
 	* src/base/ftcalc.c (FT_CeilFix, FT_FloorFix): Normalize.
--- a/src/base/ftcalc.c
+++ b/src/base/ftcalc.c
@@ -86,8 +86,7 @@
   FT_EXPORT_DEF( FT_Fixed )
   FT_RoundFix( FT_Fixed  a )
   {
-    return a >= 0 ?   ( a + 0x8000L ) & ~0xFFFFL
-                  : -((-a + 0x8000L ) & ~0xFFFFL );
+    return ( a + 0x8000L - ( a < 0 ) ) & ~0xFFFFL;
   }