summaryrefslogtreecommitdiffstats
path: root/src/raster/ftraster.c
diff options
context:
space:
mode:
authorJungshik Shin <jungshik@google.com>2016-01-15 16:18:25 -0800
committerThe Android Automerger <android-build@google.com>2016-02-24 13:20:13 -0800
commitf720f0dbcf012d6c984dbbefa0875ef9840458c6 (patch)
treebdb1068e64623c623100071dc586117aba4a2417 /src/raster/ftraster.c
parentec62c527eb34ee4481a0153ceb42dfd35d7e1d26 (diff)
downloadandroid_external_freetype-f720f0dbcf012d6c984dbbefa0875ef9840458c6.tar.gz
android_external_freetype-f720f0dbcf012d6c984dbbefa0875ef9840458c6.tar.bz2
android_external_freetype-f720f0dbcf012d6c984dbbefa0875ef9840458c6.zip
[DO NOT MERGE] Update FreeType to 2.6.2 + update from 2.6.0
1. Update to a512b0fe7a (several patches past 2.6.2). Major changes include - stem-darkening is OFF for CFF fonts by default - general code tightening - header file location is back to include/freetype (used be include/) 2. A bit more details are added to README.android for the reference. This CL requires a pdfium change (the way it includes FT header files : https://googleplex-android-review.git.corp.google.com/#/c/846889 An AOSP master CL (https://android-review.googlesource.com/#/c/196504/) is ported to mnc-dev. Bug: 24296662 Change-Id: Iec6784838d89098f332e6d1ed79663efd91a8441 Signed-off-by: Jungshik Shin <jungshik@google.com>
Diffstat (limited to 'src/raster/ftraster.c')
-rw-r--r--src/raster/ftraster.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/raster/ftraster.c b/src/raster/ftraster.c
index eeab143..e4bab98 100644
--- a/src/raster/ftraster.c
+++ b/src/raster/ftraster.c
@@ -24,8 +24,8 @@
/* */
/* - copy `src/raster/ftraster.c' (this file) to your current directory */
/* */
- /* - copy `include/ftimage.h' and `src/raster/ftmisc.h' to your current */
- /* directory */
+ /* - copy `include/freetype/ftimage.h' and `src/raster/ftmisc.h' to your */
+ /* current directory */
/* */
/* - compile `ftraster' with the _STANDALONE_ macro defined, as in */
/* */
@@ -450,7 +450,9 @@
#define CEILING( x ) ( ( (x) + ras.precision - 1 ) & -ras.precision )
#define TRUNC( x ) ( (Long)(x) >> ras.precision_bits )
#define FRAC( x ) ( (x) & ( ras.precision - 1 ) )
-#define SCALED( x ) ( ( (Long)(x) << ras.scale_shift ) - ras.precision_half )
+#define SCALED( x ) ( ( (x) < 0 ? -( -(x) << ras.scale_shift ) \
+ : ( (x) << ras.scale_shift ) ) \
+ - ras.precision_half )
#define IS_BOTTOM_OVERSHOOT( x ) \
(Bool)( CEILING( x ) - x >= ras.precision_half )
@@ -799,15 +801,14 @@
/* if it is <, simply insert it, ignore if == */
if ( n >= 0 && y > y_turns[n] )
- while ( n >= 0 )
+ do
{
Int y2 = (Int)y_turns[n];
y_turns[n] = y;
y = y2;
- n--;
- }
+ } while ( --n >= 0 );
if ( n < 0 )
{
@@ -848,7 +849,7 @@
if ( n > 1 && p )
{
- while ( n > 0 )
+ do
{
Int bottom, top;
@@ -876,8 +877,7 @@
return FAILURE;
p = p->link;
- n--;
- }
+ } while ( --n );
}
else
ras.fProfile = NULL;
@@ -1248,7 +1248,7 @@
start_arc = arc;
- while ( arc >= start_arc && e <= e2 )
+ do
{
ras.joint = FALSE;
@@ -1281,7 +1281,7 @@
}
arc -= degree;
}
- }
+ } while ( arc >= start_arc && e <= e2 );
Fin:
ras.top = top;
@@ -2114,7 +2114,7 @@
while ( current )
{
current->X = *current->offset;
- current->offset += current->flags & Flow_Up ? 1 : -1;
+ current->offset += ( current->flags & Flow_Up ) ? 1 : -1;
current->height--;
current = current->link;
}