summaryrefslogtreecommitdiffstats
path: root/src/raster/ftrend1.c
diff options
context:
space:
mode:
authorDavid 'Digit' Turner <digit@google.com>2011-08-17 18:21:28 +0200
committerDavid 'Digit' Turner <digit@google.com>2011-08-17 18:25:40 +0200
commitaeb407daf3711a10a27f3bc2223c5eb05158076e (patch)
tree570010914e8c91992ea388f2319611655c7d4b0c /src/raster/ftrend1.c
parent3053d1b9db55099918843889e4809ce97483ca9f (diff)
downloadandroid_external_freetype-aeb407daf3711a10a27f3bc2223c5eb05158076e.tar.gz
android_external_freetype-aeb407daf3711a10a27f3bc2223c5eb05158076e.tar.bz2
android_external_freetype-aeb407daf3711a10a27f3bc2223c5eb05158076e.zip
Update to FreeType 2.4.6+
This patch updates our copy of the FreeType sources to 2.4.6+. More precisely, it contains source code corresponding to the state of the upstream repository at the following hash submitted on August 16 2001: c3fb981e2ac79acad09d5673352646696472f55e This corresponds to 2.4.6 with 7 more patches applied on top of it to fix bugs in the TrueType interpreter and the CFF parser. Change-Id: I9f3ac736d616020c8d10fd1d4e4be466f35fb6e7
Diffstat (limited to 'src/raster/ftrend1.c')
-rw-r--r--src/raster/ftrend1.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/raster/ftrend1.c b/src/raster/ftrend1.c
index 1ed8af6..d8a89f2 100644
--- a/src/raster/ftrend1.c
+++ b/src/raster/ftrend1.c
@@ -161,10 +161,18 @@
/* compute the control box, and grid fit it */
FT_Outline_Get_CBox( outline, &cbox );
+ /* undocumented but confirmed: bbox values get rounded */
+#if 1
+ cbox.xMin = FT_PIX_ROUND( cbox.xMin );
+ cbox.yMin = FT_PIX_ROUND( cbox.yMin );
+ cbox.xMax = FT_PIX_ROUND( cbox.xMax );
+ cbox.yMax = FT_PIX_ROUND( cbox.yMax );
+#else
cbox.xMin = FT_PIX_FLOOR( cbox.xMin );
cbox.yMin = FT_PIX_FLOOR( cbox.yMin );
cbox.xMax = FT_PIX_CEIL( cbox.xMax );
cbox.yMax = FT_PIX_CEIL( cbox.yMax );
+#endif
width = (FT_UInt)( ( cbox.xMax - cbox.xMin ) >> 6 );
height = (FT_UInt)( ( cbox.yMax - cbox.yMin ) >> 6 );